X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fsal%2Fapi%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fpacket%2FPacketTest.java;fp=opendaylight%2Fsal%2Fapi%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fpacket%2FPacketTest.java;h=8d856b08cdcafda4f9e89f2c78b0c87b33a7f8ce;hp=8049000fa7d866d6b98abbaff5f4a7958952b642;hb=e2f7aaa41e482815ca1d4495eb85c8653cd903ab;hpb=541d0a36997f292bb037a2199463431eee538358 diff --git a/opendaylight/sal/api/src/test/java/org/opendaylight/controller/sal/packet/PacketTest.java b/opendaylight/sal/api/src/test/java/org/opendaylight/controller/sal/packet/PacketTest.java index 8049000fa7..8d856b08cd 100644 --- a/opendaylight/sal/api/src/test/java/org/opendaylight/controller/sal/packet/PacketTest.java +++ b/opendaylight/sal/api/src/test/java/org/opendaylight/controller/sal/packet/PacketTest.java @@ -59,29 +59,29 @@ public class PacketTest { Assert.assertTrue(sMAC[5] == -97); Assert.assertTrue(etherType == 0x806); - + ARP arpPacket = (ARP) eth.getPayload(); - + Assert.assertTrue(arpPacket.getHardwareType() == (byte)0x1); Assert.assertTrue(arpPacket.getProtocolType() == 2048); Assert.assertTrue(arpPacket.getHardwareAddressLength() == (byte)0x6); Assert.assertTrue(arpPacket.getProtocolAddressLength() == (byte)0x4); Assert.assertTrue(arpPacket.getOpCode() == 1); - + byte[] senderHwAddress = arpPacket.getSenderHardwareAddress(); - byte[] senderProtocolAddress = arpPacket.getSenderProtocolAddress(); - + byte[] senderProtocolAddress = arpPacket.getSenderProtocolAddress(); + byte[] targetHwAddress = arpPacket.getTargetHardwareAddress(); - byte[] targetProtocolAddress = arpPacket.getTargetProtocolAddress(); - + byte[] targetProtocolAddress = arpPacket.getTargetProtocolAddress(); + Assert.assertTrue(senderHwAddress[0] == (byte)0xA6); Assert.assertTrue(senderHwAddress[1] == (byte)0xEC); Assert.assertTrue(senderHwAddress[2] == (byte)0x9C); Assert.assertTrue(senderHwAddress[3] == (byte)0xAE); Assert.assertTrue(senderHwAddress[4] == (byte)0xB2); Assert.assertTrue(senderHwAddress[5] == (byte)0x9F); - + Assert.assertTrue(senderProtocolAddress[0] == (byte)0x9); Assert.assertTrue(senderProtocolAddress[1] == (byte)0x9); Assert.assertTrue(senderProtocolAddress[2] == (byte)0x9); @@ -102,7 +102,7 @@ public class PacketTest { Assert.assertTrue(targetProtocolAddress[0] == (byte)0x9); Assert.assertTrue(targetProtocolAddress[1] == (byte)0x9); Assert.assertTrue(targetProtocolAddress[2] == (byte)0x9); - Assert.assertTrue(targetProtocolAddress[3] == (byte)0xFE); + Assert.assertTrue(targetProtocolAddress[3] == (byte)0xFE); } @Test