BUG-2382: OutputActionBuilder.setOutputNodeConnector
[openflowplugin.git] / legacy / sal-compatibility / src / test / java / org / opendaylight / openflowplugin / legacy / sal / compatibility / test / NodeMappingTest.java
index 3a5ce2c006b0dc8a758bbb466f56adb1cb54e9d3..babf62f861cafe7e62e48510123fccfc27b8570d 100644 (file)
@@ -208,7 +208,20 @@ public class NodeMappingTest {
         NodeKey nodeKey = NodeMapping.toNodeKey(aDNode);
         Assert.assertEquals("openflow:42", nodeKey.getId().getValue());
     }
-
+    
+    /**
+     * Test method for
+     * {@link org.opendaylight.openflowplugin.legacy.sal.compatibility.NodeMapping#stripToColon(NodeConnectorId)}
+     * .
+     * @throws ConstructionException
+     */
+    @Test
+    public void testStripToColon() {
+        Assert.assertEquals("1", NodeMapping.stripToColon("openflow:42:1"));
+        Assert.assertEquals("1", NodeMapping.stripToColon("openflow:1"));
+        Assert.assertEquals("1", NodeMapping.stripToColon("1"));
+    }
     /**
      * @param nodeId
      * @param portId