X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflow-protocol-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fopenflowjava%2Fprotocol%2Fimpl%2Futil%2FActionsDeserializerTest.java;h=a63edea95735bf90c54ff2624fd5b25cf1e71df5;hb=6cd66ac6ecd35ddd17b9a489633a2443464e8581;hp=d7f79c8cb5be72e647e32cd1da1f66f4fb3dd6ff;hpb=b279e51164e2ad923a42e95333a3ca6187c2bc28;p=openflowjava.git diff --git a/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/util/ActionsDeserializerTest.java b/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/util/ActionsDeserializerTest.java index d7f79c8c..a63edea9 100644 --- a/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/util/ActionsDeserializerTest.java +++ b/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/util/ActionsDeserializerTest.java @@ -14,6 +14,7 @@ import java.util.List; import org.junit.Assert; import org.junit.Test; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EthertypeAction; +import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterAction; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.GroupIdAction; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MaxLengthAction; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.MplsTtlAction; @@ -55,7 +56,8 @@ public class ActionsDeserializerTest { + "00 18 00 08 00 00 00 00 " + "00 19 00 10 80 00 02 04 00 00 00 0B 00 00 00 00 " + "00 1A 00 08 00 0A 00 00 " - + "00 1B 00 08 00 00 00 00"); + + "00 1B 00 08 00 00 00 00 " + + "FF FF 00 10 00 00 00 08 00 01 02 03 04 05 06 07"); message.skipBytes(4); // skip XID LOGGER.info("bytes: " + message.readableBytes()); @@ -121,6 +123,12 @@ public class ActionsDeserializerTest { actions.get(14).getAugmentation(EthertypeAction.class).getEthertype().getValue().intValue()); Assert.assertEquals("Wrong action type", "org.opendaylight.yang.gen.v1.urn.opendaylight." + "openflow.common.action.rev130731.PopPbb", actions.get(15).getType().getName()); + Assert.assertEquals("Wrong action type", "org.opendaylight.yang.gen.v1.urn.opendaylight." + + "openflow.common.action.rev130731.Experimenter", actions.get(16).getType().getName()); + Assert.assertEquals("Wrong experimenter", 8, actions.get(16).getAugmentation(ExperimenterAction.class) + .getExperimenter().intValue()); + Assert.assertArrayEquals("Wrong data", new byte[]{0, 1, 2, 3, 4, 5, 6, 7}, actions.get(16) + .getAugmentation(ExperimenterAction.class).getData()); Assert.assertTrue("Unread data in message", message.readableBytes() == 0); }