diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2018-06-14 12:12:42 +0200 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2018-06-14 10:18:24 +0000 |
commit | 41e130b7f5d0aaf32c57c7b66ea6751adb219ba5 (patch) | |
tree | fb290521aa7ef3e6c8103337c483f0fe663e344a /l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizerTest.java | |
parent | a5ed4b176e17675f6fd3319b33e8b6a96b2b2307 (diff) |
l3: remove redundant stubbing for WriteContext.readBefore
Change-Id: I8c4cc2564ad0f4c6452984234d4c9466677db052
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizerTest.java')
-rw-r--r-- | l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizerTest.java | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizerTest.java b/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizerTest.java index f5a28f236..5f11a5d5c 100644 --- a/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizerTest.java +++ b/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizerTest.java @@ -22,7 +22,6 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import com.google.common.base.Optional; import io.fd.hc2vpp.common.test.write.WriterCustomizerTest; import io.fd.hc2vpp.common.translate.util.Ipv6Translator; import io.fd.hc2vpp.common.translate.util.NamingContext; @@ -35,16 +34,12 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types. import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6AddressNoZone; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.Interface1; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.Ipv6; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.ipv6.Neighbor; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.ipv6.NeighborBuilder; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev170607.VppInterfaceAugmentation; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev170607.VppInterfaceAugmentationBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev170607.interfaces._interface.RoutingBuilder; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public class Ipv6NeighbourCustomizerTest extends WriterCustomizerTest implements Ipv6Translator { @@ -66,7 +61,6 @@ public class Ipv6NeighbourCustomizerTest extends WriterCustomizerTest implements @Test public void testWriteCurrentAttributes() throws WriteFailedException { - when(writeContext.readBefore(IID.firstIdentifierOf(Interface.class))).thenReturn(Optional.absent()); when(api.ipNeighborAddDel(any())).thenReturn(future(new IpNeighborAddDelReply())); customizer.writeCurrentAttributes(IID, getData(), writeContext); verify(api).ipNeighborAddDel(getExpectedRequest(true)); @@ -74,7 +68,6 @@ public class Ipv6NeighbourCustomizerTest extends WriterCustomizerTest implements @Test public void testWriteCurrentAttributesFailed() { - when(writeContext.readBefore(IID.firstIdentifierOf(Interface.class))).thenReturn(Optional.absent()); when(api.ipNeighborAddDel(any())).thenReturn(failedFuture()); try { customizer.writeCurrentAttributes(IID, getData(), writeContext); @@ -93,7 +86,6 @@ public class Ipv6NeighbourCustomizerTest extends WriterCustomizerTest implements @Test public void testDeleteCurrentAttributes() throws WriteFailedException { - when(writeContext.readBefore(IID.firstIdentifierOf(Interface.class))).thenReturn(Optional.absent()); when(api.ipNeighborAddDel(any())).thenReturn(future(new IpNeighborAddDelReply())); customizer.deleteCurrentAttributes(IID, getData(), writeContext); verify(api).ipNeighborAddDel(getExpectedRequest(false)); @@ -101,7 +93,6 @@ public class Ipv6NeighbourCustomizerTest extends WriterCustomizerTest implements @Test public void testDeleteCurrentAttributesFailed() { - when(writeContext.readBefore(IID.firstIdentifierOf(Interface.class))).thenReturn(Optional.absent()); when(api.ipNeighborAddDel(any())).thenReturn(failedFuture()); try { customizer.deleteCurrentAttributes(IID, getData(), writeContext); @@ -116,20 +107,6 @@ public class Ipv6NeighbourCustomizerTest extends WriterCustomizerTest implements @Test public void testVrfExtractionCornerCases() throws WriteFailedException { when(api.ipNeighborAddDel(any())).thenReturn(future(new IpNeighborAddDelReply())); - - when(writeContext.readBefore(IID.firstIdentifierOf(Interface.class))) - // no augment - .thenReturn(Optional.of(new InterfaceBuilder().build())) - // empty augment - .thenReturn(Optional.of(new InterfaceBuilder() - .addAugmentation(VppInterfaceAugmentation.class, new VppInterfaceAugmentationBuilder().build()).build())) - //empty routing - .thenReturn(Optional.of(new InterfaceBuilder() - .addAugmentation(VppInterfaceAugmentation.class, new VppInterfaceAugmentationBuilder() - .setRouting(new RoutingBuilder().build()) - .build()).build())); - - customizer.writeCurrentAttributes(IID, getData(), writeContext); customizer.writeCurrentAttributes(IID, getData(), writeContext); customizer.writeCurrentAttributes(IID, getData(), writeContext); |