import org.junit.Assert;
import org.junit.Test;
import org.opendaylight.controller.routing.dijkstra_implementation.internal.DijkstraImplementation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class DijkstraTest {
+ protected static final Logger logger = LoggerFactory
+ .getLogger(DijkstraTest.class);
@Test
public void testSinglePathRouteNoBw() {
DijkstraImplementation imp = new DijkstraImplementation();
try {
edge1 = new Edge(nc11, nc21);
} catch (ConstructionException e) {
- e.printStackTrace();
+ logger.error("",e);
}
Set<Property> props = new HashSet<Property>();
props.add(new Bandwidth(0));
try {
edge2 = new Edge(nc22, nc31);
} catch (ConstructionException e) {
- e.printStackTrace();
+ logger.error("",e);
}
Set<Property> props2 = new HashSet<Property>();
props.add(new Bandwidth(0));
try {
expectedRes = new Path(expectedPath);
} catch (ConstructionException e) {
- e.printStackTrace();
+ logger.error("",e);
}
if (!res.equals(expectedRes)) {
System.out.println("Actual Res is " + res);
try {
edge1 = new Edge(nc11, nc21);
} catch (ConstructionException e) {
- e.printStackTrace();
+ logger.error("",e);
}
Set<Property> props = new HashSet<Property>();
props.add(new Bandwidth(0));
try {
edge2 = new Edge(nc22, nc31);
} catch (ConstructionException e) {
- e.printStackTrace();
+ logger.error("",e);
}
Set<Property> props2 = new HashSet<Property>();
props.add(new Bandwidth(0));
try {
edge3 = new Edge(nc12, nc32);
} catch (ConstructionException e) {
- e.printStackTrace();
+ logger.error("",e);
}
Set<Property> props3 = new HashSet<Property>();
props.add(new Bandwidth(0));
try {
expectedRes = new Path(expectedPath);
} catch (ConstructionException e) {
- e.printStackTrace();
+ logger.error("",e);
}
if (!res.equals(expectedRes)) {
System.out.println("Actual Res is " + res);
try {
edge1 = new Edge(nc11, nc21);
} catch (ConstructionException e) {
- e.printStackTrace();
+ logger.error("",e);
}
Set<Property> props = new HashSet<Property>();
props.add(new Bandwidth(0));
try {
edge2 = new Edge(nc22, nc31);
} catch (ConstructionException e) {
- e.printStackTrace();
+ logger.error("",e);
}
Set<Property> props2 = new HashSet<Property>();
props.add(new Bandwidth(0));
try {
edge3 = new Edge(nc12, nc32);
} catch (ConstructionException e) {
- e.printStackTrace();
+ logger.error("",e);
}
Set<Property> props3 = new HashSet<Property>();
props.add(new Bandwidth(0));
try {
expectedRes = new Path(expectedPath);
} catch (ConstructionException e) {
- e.printStackTrace();
+ logger.error("",e);
}
if (!res.equals(expectedRes)) {
System.out.println("Actual Res is " + res);