diff options
author | Jan Srnicek <jsrnicek@cisco.com> | 2016-09-23 16:39:09 +0200 |
---|---|---|
committer | Jan Srnicek <jsrnicek@cisco.com> | 2016-09-23 16:41:57 +0200 |
commit | a7147d16c31d9028c6b5dc557264433de0f11c91 (patch) | |
tree | 15816600ab3dfa5eea706ef1b1910b2e13ae66d7 /v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4NeighbourCustomizerTest.java | |
parent | e7a0775b21c2ea6b7bb8efb63b5384df26e27fbb (diff) |
HONEYCOMB-145 - Utility Class Refactoring
problematic mockito-all changed to mockito-core( https://github.com/mockito/mockito/issues/324)
Translate Utils Splitted to multiple Trait Interfaces
Ipv4Translator - Logic for translation of ipv4-based data
Ipv6Translator - Logic for translation of ipv6-based data
MacTranslator - Logic for translation of mac-based data
AddressTranslator - Aggregation trait for Ipv4/Ipv6/Mac
JvppReplyConsumer - Logic for extracting replies from jvpp calls
ByteDataTranslator - any byte-based conversions
Plus some existing utility classes changed to traits
Change-Id: I342b625954223966802e65dca0fabf8456c89345
Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4NeighbourCustomizerTest.java')
-rw-r--r-- | v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4NeighbourCustomizerTest.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4NeighbourCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4NeighbourCustomizerTest.java index 745276473..416468300 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4NeighbourCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/ip/Ipv4NeighbourCustomizerTest.java @@ -24,8 +24,8 @@ import static org.mockito.Mockito.when; import com.google.common.io.BaseEncoding; import io.fd.honeycomb.translate.v3po.test.ContextTestUtils; +import io.fd.honeycomb.translate.v3po.util.Ipv4Translator; import io.fd.honeycomb.translate.v3po.util.NamingContext; -import io.fd.honeycomb.translate.v3po.util.TranslateUtils; import io.fd.honeycomb.translate.write.WriteFailedException; import io.fd.honeycomb.vpp.test.write.WriterCustomizerTest; import org.junit.Before; @@ -45,7 +45,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.openvpp.jvpp.core.dto.IpNeighborAddDel; import org.openvpp.jvpp.core.dto.IpNeighborAddDelReply; -public class Ipv4NeighbourCustomizerTest extends WriterCustomizerTest { +public class Ipv4NeighbourCustomizerTest extends WriterCustomizerTest implements Ipv4Translator { private static final String IFC_CTX_NAME = "ifc-test-instance"; private static final String IFACE_NAME = "parent"; @@ -85,7 +85,7 @@ public class Ipv4NeighbourCustomizerTest extends WriterCustomizerTest { assertEquals(0, request.isIpv6); assertEquals(1, request.isAdd); assertEquals(1, request.isStatic); - assertEquals("1.2.168.192", TranslateUtils.arrayToIpv4AddressNoZone(request.dstAddress).getValue()); + assertEquals("1.2.168.192", arrayToIpv4AddressNoZone(request.dstAddress).getValue()); assertEquals("aabbccee1122", BaseEncoding.base16().lowerCase().encode(request.macAddress)); assertEquals(5, request.swIfIndex); } @@ -111,7 +111,7 @@ public class Ipv4NeighbourCustomizerTest extends WriterCustomizerTest { assertEquals(0, request.isIpv6); assertEquals(0, request.isAdd); assertEquals(1, request.isStatic); - assertEquals("1.2.168.192", TranslateUtils.arrayToIpv4AddressNoZone(request.dstAddress).getValue()); + assertEquals("1.2.168.192", arrayToIpv4AddressNoZone(request.dstAddress).getValue()); assertEquals("aabbccee1122", BaseEncoding.base16().lowerCase().encode(request.macAddress)); assertEquals(5, request.swIfIndex); } |