X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflow-protocol-api%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fopenflowjava%2Fprotocol%2Fapi%2Fkeys%2FKeysTest.java;h=09ecbda47ec49f73fd54040a58483fe9b9e8d53f;hb=5f5622e79402f70a944fa93fd7ee2d84d1776b08;hp=f270bd92d2653af918ed6da64a6e949bf9c068b2;hpb=632f1b4f5c0fca12f8f48eef64c78e0f48fa55e4;p=openflowjava.git diff --git a/openflow-protocol-api/src/test/java/org/opendaylight/openflowjava/protocol/api/keys/KeysTest.java b/openflow-protocol-api/src/test/java/org/opendaylight/openflowjava/protocol/api/keys/KeysTest.java index f270bd92..09ecbda4 100644 --- a/openflow-protocol-api/src/test/java/org/opendaylight/openflowjava/protocol/api/keys/KeysTest.java +++ b/openflow-protocol-api/src/test/java/org/opendaylight/openflowjava/protocol/api/keys/KeysTest.java @@ -2,22 +2,12 @@ package org.opendaylight.openflowjava.protocol.api.keys; import org.junit.Assert; import org.junit.Test; -import org.opendaylight.openflowjava.protocol.api.keys.ActionDeserializerKey; -import org.opendaylight.openflowjava.protocol.api.keys.ActionSerializerKey; -import org.opendaylight.openflowjava.protocol.api.keys.InstructionDeserializerKey; -import org.opendaylight.openflowjava.protocol.api.keys.InstructionSerializerKey; -import org.opendaylight.openflowjava.protocol.api.keys.MatchEntryDeserializerKey; -import org.opendaylight.openflowjava.protocol.api.keys.MatchEntrySerializerKey; -import org.opendaylight.openflowjava.protocol.api.keys.experimenter.ExperimenterActionDeserializerKey; -import org.opendaylight.openflowjava.protocol.api.keys.experimenter.ExperimenterActionSerializerKey; -import org.opendaylight.openflowjava.protocol.api.keys.experimenter.ExperimenterInstructionDeserializerKey; -import org.opendaylight.openflowjava.protocol.api.keys.experimenter.ExperimenterInstructionSerializerKey; 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.common.action.rev130731.Experimenter; -import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.ExperimenterActionSubType; -import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.InPort; -import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OpenflowBasicClass; +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.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; /** * @author michal.polkorab @@ -42,7 +32,7 @@ public class KeysTest { EncodeConstants.OF13_VERSION_ID, 1L); Assert.assertEquals(instructionDeserializerKey, experimenterInstructionDeserializerKey); Assert.assertEquals(instructionDeserializerKey.hashCode(), experimenterInstructionDeserializerKey.hashCode()); - + MatchEntryDeserializerKey matchKey = new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.OPENFLOW_BASIC_CLASS, OxmMatchConstants.ARP_OP); MatchEntryDeserializerKey matchKey2 = new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, @@ -56,8 +46,8 @@ public class KeysTest { */ @Test public void testEqualsAndHashcodeOfActionDeserializerKeys() { - ActionSerializerKey actionSerializerKey = new ActionSerializerKey<>( - EncodeConstants.OF13_VERSION_ID, Experimenter.class, 1L); + ActionSerializerKey actionSerializerKey = new ActionSerializerKey<>( + EncodeConstants.OF13_VERSION_ID, ExperimenterIdCase.class, 1L); ExperimenterActionSerializerKey experimenterActionSerializerKey = new ExperimenterActionSerializerKey( EncodeConstants.OF13_VERSION_ID, 1L, ExpSubType.class); Assert.assertFalse(actionSerializerKey.equals(experimenterActionSerializerKey)); @@ -78,7 +68,7 @@ public class KeysTest { Assert.assertEquals(matchKey, matchKey2); Assert.assertEquals(matchKey.hashCode(), matchKey2.hashCode()); } - + private static class ExpSubType extends ExperimenterActionSubType { // empty class - only used in test for comparation }