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%2Fexperimenter%2FExperimenterActionDeserializerKeyTest.java;h=2357c71a9db91d0d2f9c70138d31dc9c5e06f12d;hb=519a86d1ddcfb8f0fe264174e62e5424e1efba1f;hp=47c59033c9f342e57305483b94ca9a774301ea24;hpb=d6250c36c63faf5f5dc13d06bc5bfec7013cc141;p=openflowjava.git diff --git a/openflow-protocol-api/src/test/java/org/opendaylight/openflowjava/protocol/api/keys/experimenter/ExperimenterActionDeserializerKeyTest.java b/openflow-protocol-api/src/test/java/org/opendaylight/openflowjava/protocol/api/keys/experimenter/ExperimenterActionDeserializerKeyTest.java index 47c59033..2357c71a 100644 --- a/openflow-protocol-api/src/test/java/org/opendaylight/openflowjava/protocol/api/keys/experimenter/ExperimenterActionDeserializerKeyTest.java +++ b/openflow-protocol-api/src/test/java/org/opendaylight/openflowjava/protocol/api/keys/experimenter/ExperimenterActionDeserializerKeyTest.java @@ -1,42 +1,42 @@ -/* - * Copyright (c) 2014 Pantheon Technologies s.r.o. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ - -package org.opendaylight.openflowjava.protocol.api.keys.experimenter; - -import org.junit.Assert; -import org.junit.Test; -import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants; - -/** - * @author michal.polkorab - * - */ -public class ExperimenterActionDeserializerKeyTest { - - /** - * Test ExperimenterActionDeserializerKey equals and hashCode - */ - @Test - public void test() { - ExperimenterActionDeserializerKey key1 = - new ExperimenterActionDeserializerKey(EncodeConstants.OF10_VERSION_ID, 42L); - ExperimenterActionDeserializerKey key2 = - new ExperimenterActionDeserializerKey(EncodeConstants.OF10_VERSION_ID, 42L); - Assert.assertTrue("Wrong equals", key1.equals(key2)); - Assert.assertTrue("Wrong hashcode", key1.hashCode() == key2.hashCode()); - key2 = new ExperimenterActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 42L); - Assert.assertFalse("Wrong equals", key1.equals(key2)); - Assert.assertFalse("Wrong hashcode", key1.hashCode() == key2.hashCode()); - key2 = new ExperimenterActionDeserializerKey(EncodeConstants.OF10_VERSION_ID, null); - Assert.assertFalse("Wrong equals", key1.equals(key2)); - Assert.assertFalse("Wrong hashcode", key1.hashCode() == key2.hashCode()); - key2 = new ExperimenterActionDeserializerKey(EncodeConstants.OF10_VERSION_ID, 55L); - Assert.assertFalse("Wrong equals", key1.equals(key2)); - Assert.assertFalse("Wrong hashcode", key1.hashCode() == key2.hashCode()); - } +/* + * Copyright (c) 2014 Pantheon Technologies s.r.o. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.openflowjava.protocol.api.keys.experimenter; + +import org.junit.Assert; +import org.junit.Test; +import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants; + +/** + * @author michal.polkorab + * + */ +public class ExperimenterActionDeserializerKeyTest { + + /** + * Test ExperimenterActionDeserializerKey equals and hashCode + */ + @Test + public void test() { + ExperimenterActionDeserializerKey key1 = + new ExperimenterActionDeserializerKey(EncodeConstants.OF10_VERSION_ID, 42L); + ExperimenterActionDeserializerKey key2 = + new ExperimenterActionDeserializerKey(EncodeConstants.OF10_VERSION_ID, 42L); + Assert.assertTrue("Wrong equals", key1.equals(key2)); + Assert.assertTrue("Wrong hashcode", key1.hashCode() == key2.hashCode()); + key2 = new ExperimenterActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 42L); + Assert.assertFalse("Wrong equals", key1.equals(key2)); + Assert.assertFalse("Wrong hashcode", key1.hashCode() == key2.hashCode()); + key2 = new ExperimenterActionDeserializerKey(EncodeConstants.OF10_VERSION_ID, null); + Assert.assertFalse("Wrong equals", key1.equals(key2)); + Assert.assertFalse("Wrong hashcode", key1.hashCode() == key2.hashCode()); + key2 = new ExperimenterActionDeserializerKey(EncodeConstants.OF10_VERSION_ID, 55L); + Assert.assertFalse("Wrong equals", key1.equals(key2)); + Assert.assertFalse("Wrong hashcode", key1.hashCode() == key2.hashCode()); + } } \ No newline at end of file