Update MRI upstreams for Phosphorus
[openflowplugin.git] / openflowjava / openflow-protocol-api / src / test / java / org / opendaylight / openflowjava / protocol / api / keys / KeysTest.java
index 350a91a5bc7ff27e321d8fb9571e8ae8d7bd6ae4..f17a165cd346f0ea900a0671f90b38f1e3bf9633 100644 (file)
@@ -11,7 +11,7 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.action.container.action.choice.ExperimenterIdCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.experimenter.id.action.ExperimenterIdCase;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.ExperimenterActionSubType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.InPort;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
@@ -29,24 +29,23 @@ public class KeysTest {
      */
     @Test
     public void testEqualsAndHashcodeOfDeserializerKeys() {
-        ActionDeserializerKey actionDeserializerKey = new ActionDeserializerKey(EncodeConstants.OF13_VERSION_ID,
+        ActionDeserializerKey actionDeserializerKey = new ActionDeserializerKey(EncodeConstants.OF_VERSION_1_3,
                 EncodeConstants.EXPERIMENTER_VALUE, 1L);
         ExperimenterActionDeserializerKey experimenterActionDeserializerKey = new ExperimenterActionDeserializerKey(
-                EncodeConstants.OF13_VERSION_ID, 1L);
+                EncodeConstants.OF_VERSION_1_3, 1L);
         Assert.assertEquals(actionDeserializerKey, experimenterActionDeserializerKey);
         Assert.assertEquals(actionDeserializerKey.hashCode(), experimenterActionDeserializerKey.hashCode());
 
         InstructionDeserializerKey instructionDeserializerKey = new InstructionDeserializerKey(
-                EncodeConstants.OF13_VERSION_ID, EncodeConstants.EXPERIMENTER_VALUE, 1L);
+                EncodeConstants.OF_VERSION_1_3, EncodeConstants.EXPERIMENTER_VALUE, 1L);
         ExperimenterInstructionDeserializerKey experimenterInstructionDeserializerKey =
-                new ExperimenterInstructionDeserializerKey(
-                EncodeConstants.OF13_VERSION_ID, 1L);
+                new ExperimenterInstructionDeserializerKey(EncodeConstants.OF_VERSION_1_3, 1L);
         Assert.assertEquals(instructionDeserializerKey, experimenterInstructionDeserializerKey);
         Assert.assertEquals(instructionDeserializerKey.hashCode(), experimenterInstructionDeserializerKey.hashCode());
 
-        MatchEntryDeserializerKey matchKey = new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID,
+        MatchEntryDeserializerKey matchKey = new MatchEntryDeserializerKey(EncodeConstants.OF_VERSION_1_3,
                 OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.ARP_OP);
-        MatchEntryDeserializerKey matchKey2 = new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID,
+        MatchEntryDeserializerKey matchKey2 = new MatchEntryDeserializerKey(EncodeConstants.OF_VERSION_1_3,
                 OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.ARP_OP);
         Assert.assertEquals(matchKey, matchKey2);
         Assert.assertEquals(matchKey.hashCode(), matchKey2.hashCode());
@@ -58,26 +57,26 @@ public class KeysTest {
     @Test
     public void testEqualsAndHashcodeOfActionDeserializerKeys() {
         ActionSerializerKey<ExperimenterIdCase> actionSerializerKey = new ActionSerializerKey<>(
-                EncodeConstants.OF13_VERSION_ID, ExperimenterIdCase.class, Uint32.ONE);
+                EncodeConstants.OF_VERSION_1_3, ExperimenterIdCase.class, Uint32.ONE);
         ExperimenterActionSerializerKey experimenterActionSerializerKey = new ExperimenterActionSerializerKey(
-                EncodeConstants.OF13_VERSION_ID,  Uint32.ONE, ExpSubType.class);
+                EncodeConstants.OF_VERSION_1_3,  Uint32.ONE, ExpSubType.class);
         Assert.assertFalse(actionSerializerKey.equals(experimenterActionSerializerKey));
         Assert.assertFalse(experimenterActionSerializerKey.equals(actionSerializerKey));
 
         InstructionSerializerKey<org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225
             .instruction.container.instruction.choice.ExperimenterIdCase> instructionSerializerKey =
-                new InstructionSerializerKey<>(EncodeConstants.OF13_VERSION_ID, org.opendaylight.yang.gen.v1.urn
+                new InstructionSerializerKey<>(EncodeConstants.OF_VERSION_1_3, org.opendaylight.yang.gen.v1.urn
                         .opendaylight.openflow.augments.rev150225.instruction.container.instruction.choice
                         .ExperimenterIdCase.class, 1L);
         ExperimenterInstructionSerializerKey experimenterInstructionSerializerKey =
-                new ExperimenterInstructionSerializerKey(EncodeConstants.OF13_VERSION_ID, 1L);
+                new ExperimenterInstructionSerializerKey(EncodeConstants.OF_VERSION_1_3, 1L);
         Assert.assertEquals(instructionSerializerKey, experimenterInstructionSerializerKey);
         Assert.assertEquals(instructionSerializerKey.hashCode(), experimenterInstructionSerializerKey.hashCode());
 
         MatchEntrySerializerKey<OpenflowBasicClass, InPort> matchKey = new MatchEntrySerializerKey<>(
-                EncodeConstants.OF10_VERSION_ID, OpenflowBasicClass.class, InPort.class);
+                EncodeConstants.OF_VERSION_1_0, OpenflowBasicClass.class, InPort.class);
         MatchEntrySerializerKey<OpenflowBasicClass, InPort> matchKey2 = new MatchEntrySerializerKey<>(
-                EncodeConstants.OF10_VERSION_ID, OpenflowBasicClass.class, InPort.class);
+                EncodeConstants.OF_VERSION_1_0, OpenflowBasicClass.class, InPort.class);
         Assert.assertEquals(matchKey, matchKey2);
         Assert.assertEquals(matchKey.hashCode(), matchKey2.hashCode());
     }
@@ -85,5 +84,4 @@ public class KeysTest {
     private interface ExpSubType extends ExperimenterActionSubType {
         // empty class - only used in test for comparation
     }
-
 }