Search in sources :

Example 6 with ExperimenterIdTypeDeserializerKey

use of org.opendaylight.openflowjava.protocol.api.keys.ExperimenterIdTypeDeserializerKey in project openflowplugin by opendaylight.

the class ExperimenterIdTypeDeserializerKeyTest method testEquals.

/**
 * Test ExperimenterIdTypeDeserializerKey equals - additional test.
 */
@Test
public void testEquals() {
    ExperimenterIdTypeDeserializerKey key1 = new ExperimenterIdTypeDeserializerKey(EncodeConstants.OF10_VERSION_ID, 41L, 1L, ExperimenterMessage.class);
    Assert.assertTrue("Wrong equal to identical object.", key1.equals(key1));
    ExperimenterIdSerializerKey<?> mk = new ExperimenterIdSerializerKey<>(EncodeConstants.OF10_VERSION_ID, 42L, ExperimenterMessage.class);
    Assert.assertFalse("Wrong equal to different class.", key1.equals(mk));
    ExperimenterIdTypeDeserializerKey key2 = new ExperimenterIdTypeDeserializerKey(EncodeConstants.OF10_VERSION_ID, 42L, 1L, ExperimenterMessage.class);
    Assert.assertFalse("Wrong equal by experimenterId.", key1.equals(key2));
    ExperimenterIdTypeDeserializerKey key3 = new ExperimenterIdTypeDeserializerKey(EncodeConstants.OF10_VERSION_ID, 41L, 2L, ExperimenterMessage.class);
    Assert.assertFalse("Wrong equal by type.", key1.equals(key3));
}
Also used : ExperimenterIdTypeDeserializerKey(org.opendaylight.openflowjava.protocol.api.keys.ExperimenterIdTypeDeserializerKey) ExperimenterIdSerializerKey(org.opendaylight.openflowjava.protocol.api.keys.ExperimenterIdSerializerKey) Test(org.junit.Test)

Aggregations

ExperimenterIdTypeDeserializerKey (org.opendaylight.openflowjava.protocol.api.keys.ExperimenterIdTypeDeserializerKey)6 Test (org.junit.Test)3 ExperimenterDataOfChoice (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.experimenter.core.ExperimenterDataOfChoice)3 ExperimenterIdDeserializerKey (org.opendaylight.openflowjava.protocol.api.keys.ExperimenterIdDeserializerKey)2 ErrorMessage (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ErrorMessage)2 SuppressFBWarnings (edu.umd.cs.findbugs.annotations.SuppressFBWarnings)1 OFDeserializer (org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer)1 ExperimenterIdSerializerKey (org.opendaylight.openflowjava.protocol.api.keys.ExperimenterIdSerializerKey)1 MessageTypeKey (org.opendaylight.openflowjava.protocol.api.keys.MessageTypeKey)1 ConvertorMessageFromOFJava (org.opendaylight.openflowplugin.extension.api.ConvertorMessageFromOFJava)1 ConversionException (org.opendaylight.openflowplugin.extension.api.exception.ConversionException)1 OnfExperimenterErrorFactory (org.opendaylight.openflowplugin.extension.onf.deserializer.OnfExperimenterErrorFactory)1 ExperimenterId (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ExperimenterId)1 ExperimenterMessage (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ExperimenterMessage)1 ExperimenterMessageOfChoice (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.experimenter.types.rev151020.experimenter.core.message.ExperimenterMessageOfChoice)1 MultipartReplyExperimenterBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.experimenter.types.rev151020.multipart.reply.multipart.reply.body.MultipartReplyExperimenterBuilder)1 BundlePropertyBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.rev170124.bundle.common.grouping.BundlePropertyBuilder)1 BundlePropertyExperimenterBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.rev170124.bundle.property.grouping.bundle.property.entry.BundlePropertyExperimenterBuilder)1 BundlePropertyExperimenterData (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.rev170124.bundle.property.grouping.bundle.property.entry.bundle.property.experimenter.BundlePropertyExperimenterData)1