diff options
author | Jan Srnicek <jsrnicek@cisco.com> | 2017-04-10 16:11:03 +0200 |
---|---|---|
committer | Jan Srnicek <jsrnicek@cisco.com> | 2017-04-11 08:16:29 +0000 |
commit | 308b35c6bdf85a1ad401d40bbfcdf293ce2687b9 (patch) | |
tree | 6ba453d94ac2e646033bf81076c3c2ca52987b22 /lisp/lisp2vpp/src/test | |
parent | 4fe803a800fd3ef7d88c775a78a9e6632cfcf955 (diff) |
HC2VPP-126 - Eid context artificial prefix
Artificial prefix for mappings that are not present
Change-Id: I789750e3877918b2e15ba19871da1bf8bc4e207b
Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Diffstat (limited to 'lisp/lisp2vpp/src/test')
3 files changed, 11 insertions, 11 deletions
diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/context/util/EidMappingContextTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/context/util/EidMappingContextTest.java index bb70bd358..f4325b00c 100644 --- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/context/util/EidMappingContextTest.java +++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/context/util/EidMappingContextTest.java @@ -17,6 +17,9 @@ package io.fd.hc2vpp.lisp.context.util; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + import io.fd.hc2vpp.lisp.util.EidMappingContextHelper; import io.fd.honeycomb.translate.MappingContext; import org.junit.Before; @@ -30,9 +33,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.dp.subtable.grouping.local.mappings.local.mapping.Eid; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev170315.dp.subtable.grouping.local.mappings.local.mapping.EidBuilder; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - public class EidMappingContextTest implements EidMappingContextHelper { private static final String EID_MAPPING_CONTEXT_NAME = "eidMappingContext"; @@ -51,7 +51,7 @@ public class EidMappingContextTest implements EidMappingContextHelper { @Before public void init() { MockitoAnnotations.initMocks(this); - eidMappingContext = new EidMappingContext(EID_MAPPING_CONTEXT_NAME); + eidMappingContext = new EidMappingContext(EID_MAPPING_CONTEXT_NAME, "eid-ctx-"); localEid = new EidBuilder().setAddress(new Ipv4Builder().setIpv4(new Ipv4Address("192.168.2.1")).build()).build(); diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizerTest.java index 8a78c6e76..264fe6ccb 100644 --- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizerTest.java +++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizerTest.java @@ -29,14 +29,14 @@ import static org.junit.Assert.assertEquals; import static org.mockito.Matchers.any; import static org.mockito.Mockito.when; +import io.fd.hc2vpp.common.test.read.ListReaderCustomizerTest; +import io.fd.hc2vpp.common.translate.util.ByteDataTranslator; import io.fd.hc2vpp.lisp.context.util.AdjacenciesMappingContext; import io.fd.hc2vpp.lisp.context.util.EidMappingContext; import io.fd.hc2vpp.lisp.translate.util.EidMetadataProvider; import io.fd.hc2vpp.lisp.util.AdjacencyMappingContextTestHelper; import io.fd.hc2vpp.lisp.util.EidMappingContextHelper; import io.fd.honeycomb.translate.spi.read.ReaderCustomizer; -import io.fd.hc2vpp.common.translate.util.ByteDataTranslator; -import io.fd.hc2vpp.common.test.read.ListReaderCustomizerTest; import io.fd.vpp.jvpp.core.dto.LispAdjacenciesGetReply; import io.fd.vpp.jvpp.core.types.LispAdjacency; import java.util.List; @@ -115,8 +115,8 @@ public class AdjacencyCustomizerTest @Override protected ReaderCustomizer<Adjacency, AdjacencyBuilder> initCustomizer() { - return new AdjacencyCustomizer(api, new EidMappingContext("local-mapping-context"), - new EidMappingContext("remote-mapping-context"), + return new AdjacencyCustomizer(api, new EidMappingContext("local-mapping-context", "local-mapping-"), + new EidMappingContext("remote-mapping-context", "remote-mapping-"), new AdjacenciesMappingContext("adjacencies-mapping-context")); } diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/AdjacencyCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/AdjacencyCustomizerTest.java index ae5cd351c..91087a879 100644 --- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/AdjacencyCustomizerTest.java +++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/write/AdjacencyCustomizerTest.java @@ -30,10 +30,10 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +import io.fd.hc2vpp.common.test.write.WriterCustomizerTest; import io.fd.hc2vpp.lisp.context.util.AdjacenciesMappingContext; import io.fd.hc2vpp.lisp.context.util.EidMappingContext; import io.fd.hc2vpp.lisp.util.EidMappingContextHelper; -import io.fd.hc2vpp.common.test.write.WriterCustomizerTest; import io.fd.vpp.jvpp.core.dto.LispAddDelAdjacency; import io.fd.vpp.jvpp.core.dto.LispAddDelAdjacencyReply; import org.junit.Before; @@ -87,8 +87,8 @@ public class AdjacencyCustomizerTest extends WriterCustomizerTest implements Eid @Before public void init() { - localMappingContext = new EidMappingContext("local-mapping-context"); - remoteMappingContext = new EidMappingContext("remote-mapping-context"); + localMappingContext = new EidMappingContext("local-mapping-context", "local-mapping-"); + remoteMappingContext = new EidMappingContext("remote-mapping-context", "remote-mapping-"); customizer = new AdjacencyCustomizer(api, localMappingContext, remoteMappingContext, adjacenciesMappingContext); emptyId = InstanceIdentifier.create(Adjacency.class); |