summaryrefslogtreecommitdiffstats
path: root/v3po/v3po2vpp/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'v3po/v3po2vpp/src/test/java')
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/ip/Ipv4AddressCustomizerTest.java33
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/ip/SubInterfaceIpv4AddressCustomizerTest.java13
2 files changed, 16 insertions, 30 deletions
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/ip/Ipv4AddressCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/ip/Ipv4AddressCustomizerTest.java
index a2eda9157..bac21c88f 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/ip/Ipv4AddressCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/ip/Ipv4AddressCustomizerTest.java
@@ -120,10 +120,8 @@ public class Ipv4AddressCustomizerTest extends ListReaderCustomizerTest<Address,
IpAddressDetails detail1 = new IpAddressDetails();
IpAddressDetails detail2 = new IpAddressDetails();
- detail1.ip = reverseBytes(
- ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1"))));
- detail2.ip = reverseBytes(
- ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.2"))));
+ detail1.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1")));
+ detail2.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.2")));
IpAddressDetailsReplyDump reply = new IpAddressDetailsReplyDump();
reply.ipAddressDetails = ImmutableList.of(detail1);
@@ -166,12 +164,9 @@ public class Ipv4AddressCustomizerTest extends ListReaderCustomizerTest<Address,
IpAddressDetails detail2 = new IpAddressDetails();
IpAddressDetails detail3 = new IpAddressDetails();
- detail1.ip = reverseBytes(
- ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1"))));
- detail2.ip = reverseBytes(
- ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.2"))));
- detail3.ip = reverseBytes(
- ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.3"))));
+ detail1.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1")));
+ detail2.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.2")));
+ detail3.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.3")));
IpAddressDetailsReplyDump reply = new IpAddressDetailsReplyDump();
reply.ipAddressDetails = ImmutableList.of(detail1, detail2, detail3);
@@ -192,12 +187,9 @@ public class Ipv4AddressCustomizerTest extends ListReaderCustomizerTest<Address,
IpAddressDetails detail2 = new IpAddressDetails();
IpAddressDetails detail3 = new IpAddressDetails();
- detail1.ip = reverseBytes(
- ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1"))));
- detail2.ip = reverseBytes(
- ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.2"))));
- detail3.ip = reverseBytes(
- ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.3"))));
+ detail1.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1")));
+ detail2.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.2")));
+ detail3.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.3")));
IpAddressDetailsReplyDump reply = new IpAddressDetailsReplyDump();
reply.ipAddressDetails = ImmutableList.of(detail1, detail2, detail3);
@@ -257,12 +249,10 @@ public class Ipv4AddressCustomizerTest extends ListReaderCustomizerTest<Address,
replyIfaceOne.ipAddressDetails = Arrays.asList(detailIfaceOneAddressOne);
replyIfaceTwo.ipAddressDetails = Arrays.asList(detailIfaceTwoAddressOne);
- detailIfaceOneAddressOne.ip = reverseBytes(
- ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1"))));
+ detailIfaceOneAddressOne.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1")));
detailIfaceOneAddressOne.prefixLength = 22;
- detailIfaceTwoAddressOne.ip = reverseBytes(
- ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1"))));
+ detailIfaceTwoAddressOne.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1")));
detailIfaceTwoAddressOne.prefixLength = 23;
cache.put(cacheKeyFactory.createKey(ifaceOneAddressOneIdentifier), replyIfaceOne);
@@ -274,8 +264,7 @@ public class Ipv4AddressCustomizerTest extends ListReaderCustomizerTest<Address,
IpAddressDetailsReplyDump replyIfaceOne = new IpAddressDetailsReplyDump();
replyIfaceOne.ipAddressDetails = Arrays.asList(detailIfaceOneAddressOne);
- detailIfaceOneAddressOne.ip = reverseBytes(
- ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1"))));
+ detailIfaceOneAddressOne.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1")));
detailIfaceOneAddressOne.prefixLength = 22;
cache.put(cacheKeyFactory.createKey(ifaceOneAddressOneIdentifier), replyIfaceOne);
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/ip/SubInterfaceIpv4AddressCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/ip/SubInterfaceIpv4AddressCustomizerTest.java
index cecc70235..4842f5de4 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/ip/SubInterfaceIpv4AddressCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/ip/SubInterfaceIpv4AddressCustomizerTest.java
@@ -204,12 +204,10 @@ public class SubInterfaceIpv4AddressCustomizerTest extends ListReaderCustomizerT
replyIfaceOne.ipAddressDetails = Arrays.asList(detailIfaceOneAddressOne);
replyIfaceTwo.ipAddressDetails = Arrays.asList(detailIfaceTwoAddressOne);
- detailIfaceOneAddressOne.ip = reverseBytes(
- ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1"))));
+ detailIfaceOneAddressOne.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1")));
detailIfaceOneAddressOne.prefixLength = 22;
- detailIfaceTwoAddressOne.ip = reverseBytes(
- ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1"))));
+ detailIfaceTwoAddressOne.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1")));
detailIfaceTwoAddressOne.prefixLength = 23;
cache.put(cacheKeyFactory.createKey(ifaceOneAddressOneIdentifier), replyIfaceOne);
@@ -221,8 +219,7 @@ public class SubInterfaceIpv4AddressCustomizerTest extends ListReaderCustomizerT
IpAddressDetailsReplyDump replyIfaceOne = new IpAddressDetailsReplyDump();
replyIfaceOne.ipAddressDetails = Arrays.asList(detailIfaceOneAddressOne);
- detailIfaceOneAddressOne.ip = reverseBytes(
- ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1"))));
+ detailIfaceOneAddressOne.ip = ipv4AddressNoZoneToArray(new Ipv4AddressNoZone(new Ipv4Address("192.168.2.1")));
detailIfaceOneAddressOne.prefixLength = 22;
cache.put(cacheKeyFactory.createKey(ifaceOneAddressOneIdentifier), replyIfaceOne);
@@ -233,12 +230,12 @@ public class SubInterfaceIpv4AddressCustomizerTest extends ListReaderCustomizerT
final IpAddressDetailsReplyDump reply = new IpAddressDetailsReplyDump();
final IpAddressDetails details1 = new IpAddressDetails();
- details1.ip = new byte[]{1, 1, 1, 10};
+ details1.ip = new byte[]{10, 1, 1, 1};
details1.prefixLength = (byte) PREFIX_LENGTH;
reply.ipAddressDetails.add(details1);
final IpAddressDetails details2 = new IpAddressDetails();
- details2.ip = new byte[]{2, 1, 1, 10};
+ details2.ip = new byte[]{10, 1, 1, 2};
details2.prefixLength = (byte) PREFIX_LENGTH;
reply.ipAddressDetails.add(details2);