Renamed class routing.TopoRouteService to topology.TopologyManager
diff --git a/src/test/java/net/onrc/onos/ofcontroller/routing/TopoRouteServiceTest.java b/src/test/java/net/onrc/onos/ofcontroller/routing/TopoRouteServiceTest.java
index 7929eb1..67c7ec3 100644
--- a/src/test/java/net/onrc/onos/ofcontroller/routing/TopoRouteServiceTest.java
+++ b/src/test/java/net/onrc/onos/ofcontroller/routing/TopoRouteServiceTest.java
@@ -20,7 +20,7 @@
import net.onrc.onos.graph.GraphDBConnection;
import net.onrc.onos.graph.GraphDBOperation;
import net.onrc.onos.ofcontroller.core.internal.TestDatabaseManager;
-import net.onrc.onos.ofcontroller.routing.TopoRouteService;
+import net.onrc.onos.ofcontroller.topology.TopologyManager;
import net.onrc.onos.ofcontroller.util.DataPath;
import net.onrc.onos.ofcontroller.util.Dpid;
import net.onrc.onos.ofcontroller.util.FlowPathFlags;
@@ -28,17 +28,17 @@
import net.onrc.onos.ofcontroller.util.SwitchPort;
/**
- * A class for testing the TopoRouteService class.
- * @see net.onrc.onos.ofcontroller.routing.TopoRouteService
+ * A class for testing the TopologyManager class.
+ * @see net.onrc.onos.ofcontroller.topology.TopologyManager
*/
@RunWith(PowerMockRunner.class)
-@PrepareForTest({TitanFactory.class, GraphDBConnection.class, GraphDBOperation.class, TopoRouteService.class})
+@PrepareForTest({TitanFactory.class, GraphDBConnection.class, GraphDBOperation.class, TopologyManager.class})
public class TopoRouteServiceTest {
String conf;
private GraphDBConnection conn = null;
private GraphDBOperation oper = null;
private TitanGraph titanGraph = null;
- private TopoRouteService topoRouteService = null;
+ private TopologyManager topologyManager = null;
/**
* Setup the tests.
@@ -63,9 +63,9 @@
// Populate the database
TestDatabaseManager.populateTestData(titanGraph);
- // Prepare the TopoRouteService instance
- topoRouteService = new TopoRouteService();
- topoRouteService.setDbOperationHandler(oper);
+ // Prepare the TopologyManager instance
+ topologyManager = new TopologyManager();
+ topologyManager.setDbOperationHandler(oper);
}
/**
@@ -78,9 +78,9 @@
}
/**
- * Test method TopoRouteService.getTopoShortestPath()
+ * Test method TopologyManager.getTopoShortestPath()
*
- * @see net.onrc.onos.ofcontroller.routing.TopoRouteService#getTopoShortestPath
+ * @see net.onrc.onos.ofcontroller.topology.TopologyManager#getTopoShortestPath
*/
@Test
public void test_getTopoShortestPath() {
@@ -104,10 +104,10 @@
// Test a valid Shortest-Path computation
//
Map<Long, ?> shortestPathTopo =
- topoRouteService.prepareShortestPathTopo();
- dataPath = topoRouteService.getTopoShortestPath(shortestPathTopo,
- srcSwitchPort,
- dstSwitchPort);
+ topologyManager.prepareShortestPathTopo();
+ dataPath = topologyManager.getTopoShortestPath(shortestPathTopo,
+ srcSwitchPort,
+ dstSwitchPort);
assertTrue(dataPath != null);
String dataPathSummaryStr = dataPath.dataPathSummary();
// System.out.println(dataPathSummaryStr);
@@ -134,18 +134,18 @@
String noSuchDpidStr = "ff:ff:00:00:00:00:0a:06";
Dpid noSuchDstDpid = new Dpid(noSuchDpidStr);
SwitchPort noSuchDstSwitchPort = new SwitchPort(noSuchDstDpid, dstPort);
- dataPath = topoRouteService.getTopoShortestPath(shortestPathTopo,
- srcSwitchPort,
- noSuchDstSwitchPort);
+ dataPath = topologyManager.getTopoShortestPath(shortestPathTopo,
+ srcSwitchPort,
+ noSuchDstSwitchPort);
assertTrue(dataPath == null);
- topoRouteService.dropShortestPathTopo(shortestPathTopo);
+ topologyManager.dropShortestPathTopo(shortestPathTopo);
}
/**
- * Test method TopoRouteService.getShortestPath()
+ * Test method TopologyManager.getShortestPath()
*
- * @see net.onrc.onos.ofcontroller.routing.TopoRouteService#getShortestPath
+ * @see net.onrc.onos.ofcontroller.routing.TopologyManager#getShortestPath
*/
@Test
public void test_getShortestPath() {
@@ -168,8 +168,8 @@
//
// Test a valid Shortest-Path computation
//
- dataPath = topoRouteService.getShortestPath(srcSwitchPort,
- dstSwitchPort);
+ dataPath = topologyManager.getShortestPath(srcSwitchPort,
+ dstSwitchPort);
assertTrue(dataPath != null);
String dataPathSummaryStr = dataPath.dataPathSummary();
// System.out.println(dataPathSummaryStr);
@@ -197,15 +197,15 @@
Dpid noSuchDstDpid = new Dpid(noSuchDpidStr);
SwitchPort noSuchDstSwitchPort = new SwitchPort(noSuchDstDpid, dstPort);
- dataPath = topoRouteService.getShortestPath(srcSwitchPort,
- noSuchDstSwitchPort);
+ dataPath = topologyManager.getShortestPath(srcSwitchPort,
+ noSuchDstSwitchPort);
assertTrue(dataPath == null);
}
/**
- * Test method TopoRouteService.routeExists()
+ * Test method TopologyManager.routeExists()
*
- * @see net.onrc.onos.ofcontroller.routing.TopoRouteService#routeExists
+ * @see net.onrc.onos.ofcontroller.routing.TopologyManager#routeExists
*/
@Test
public void test_routeExists() {
@@ -228,7 +228,7 @@
//
// Test a valid route
//
- result = topoRouteService.routeExists(srcSwitchPort, dstSwitchPort);
+ result = topologyManager.routeExists(srcSwitchPort, dstSwitchPort);
assertTrue(result == true);
//
@@ -237,8 +237,8 @@
String noSuchDpidStr = "ff:ff:00:00:00:00:0a:06";
Dpid noSuchDstDpid = new Dpid(noSuchDpidStr);
SwitchPort noSuchDstSwitchPort = new SwitchPort(noSuchDstDpid, dstPort);
- result = topoRouteService.routeExists(srcSwitchPort,
- noSuchDstSwitchPort);
+ result = topologyManager.routeExists(srcSwitchPort,
+ noSuchDstSwitchPort);
assertTrue(result != true);
}
}