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
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,
*/
@Test
public void testEqualsAndHashcodeOfActionDeserializerKeys() {
- ActionSerializerKey<Experimenter> actionSerializerKey = new ActionSerializerKey<>(
- EncodeConstants.OF13_VERSION_ID, Experimenter.class, 1L);
+ ActionSerializerKey<ExperimenterIdCase> 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));
Assert.assertEquals(matchKey, matchKey2);
Assert.assertEquals(matchKey.hashCode(), matchKey2.hashCode());
}
-
+
private static class ExpSubType extends ExperimenterActionSubType {
// empty class - only used in test for comparation
}