Fixed Breadth first by marking nodes as visited.
[ailab2.git] / test / MySearcherTest.java
blob9bdbab7bacdadebe65641279305ae5b726bce62c
1 import java.io.File;
2 import junit.framework.*;
4 public class MySearcherTest extends TestCase
6 public MySearcherTest (String name) {
7 super (name);
10 public void testMap() {
11 System.out.println("----------Test Map-------------");
12 MySearcher my = new MySearcher();
13 my.setMap(new File("maps/umea_map.xml"));
14 System.out.println(my.toString());
17 public void testBreadthFirst() {
18 System.out.println("----------Test Breadthfirst-------------");
19 MySearcher my = new MySearcher();
20 my.setMap(new File("maps/umea_map.xml"));
21 System.out.println(my.breadthFirst("Flygplatsen", "Begbilar"));
24 public void testDepthFirst() {
25 System.out.println("----------Test Depthfirst-------------");
26 MySearcher my = new MySearcher();
27 my.setMap(new File("maps/umea_map.xml"));
28 System.out.println(my.depthFirst("Flygplatsen", "Begbilar"));