summaryrefslogtreecommitdiffstats
path: root/v3po/v3po2vpp/src/test/java/io/fd
diff options
context:
space:
mode:
Diffstat (limited to 'v3po/v3po2vpp/src/test/java/io/fd')
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizerTest.java10
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizerTest.java30
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizerTest.java10
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/span/MirroredInterfacesCustomizerTest.java5
4 files changed, 16 insertions, 39 deletions
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizerTest.java
index 50d6754de..5b371e6a1 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/GreCustomizerTest.java
@@ -153,15 +153,9 @@ public class GreCustomizerTest extends WriterCustomizerTest {
fail("WriteFailedException.CreateFailedException was expected");
}
- @Test
+ @Test(expected = UnsupportedOperationException.class)
public void testUpdateCurrentAttributes() throws Exception {
- try {
- customizer.updateCurrentAttributes(id, generateGre(), generateGre(), writeContext);
- } catch (WriteFailedException.UpdateFailedException e) {
- assertEquals(UnsupportedOperationException.class, e.getCause().getClass());
- return;
- }
- fail("WriteFailedException.UpdateFailedException was expected");
+ customizer.updateCurrentAttributes(id, generateGre(), generateGre(), writeContext);
}
@Test
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizerTest.java
index 3c6ffaf51..af4f6bd40 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanCustomizerTest.java
@@ -27,6 +27,15 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import com.google.common.net.InetAddresses;
+import io.fd.hc2vpp.common.test.write.WriterCustomizerTest;
+import io.fd.hc2vpp.common.translate.util.NamingContext;
+import io.fd.hc2vpp.v3po.DisabledInterfacesManager;
+import io.fd.honeycomb.translate.write.WriteFailedException;
+import io.fd.vpp.jvpp.VppBaseCallException;
+import io.fd.vpp.jvpp.VppInvocationException;
+import io.fd.vpp.jvpp.core.dto.VxlanAddDelTunnel;
+import io.fd.vpp.jvpp.core.dto.VxlanAddDelTunnelReply;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
@@ -42,17 +51,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev170607.interfaces._interface.VxlanBuilder;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import com.google.common.net.InetAddresses;
-
-import io.fd.hc2vpp.common.test.write.WriterCustomizerTest;
-import io.fd.hc2vpp.common.translate.util.NamingContext;
-import io.fd.hc2vpp.v3po.DisabledInterfacesManager;
-import io.fd.honeycomb.translate.write.WriteFailedException;
-import io.fd.vpp.jvpp.VppBaseCallException;
-import io.fd.vpp.jvpp.VppInvocationException;
-import io.fd.vpp.jvpp.core.dto.VxlanAddDelTunnel;
-import io.fd.vpp.jvpp.core.dto.VxlanAddDelTunnelReply;
-
public class VxlanCustomizerTest extends WriterCustomizerTest {
private static final byte ADD_VXLAN = 1;
@@ -187,15 +185,9 @@ public class VxlanCustomizerTest extends WriterCustomizerTest {
fail("WriteFailedException.CreateFailedException was expected");
}
- @Test
+ @Test(expected = UnsupportedOperationException.class)
public void testUpdateCurrentAttributes() throws Exception {
- try {
- customizer.updateCurrentAttributes(id, generateVxlan(10), generateVxlan(11), writeContext);
- } catch (WriteFailedException.UpdateFailedException e) {
- assertEquals(UnsupportedOperationException.class, e.getCause().getClass());
- return;
- }
- fail("WriteFailedException.UpdateFailedException was expected");
+ customizer.updateCurrentAttributes(id, generateVxlan(10), generateVxlan(11), writeContext);
}
@Test
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizerTest.java
index 1f3c7ec65..f5bb60fd0 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/VxlanGpeCustomizerTest.java
@@ -175,15 +175,9 @@ public class VxlanGpeCustomizerTest extends WriterCustomizerTest {
fail("WriteFailedException.CreateFailedException was expected");
}
- @Test
+ @Test(expected = UnsupportedOperationException.class)
public void testUpdateCurrentAttributes() throws Exception {
- try {
- customizer.updateCurrentAttributes(id, generateVxlanGpe(10), generateVxlanGpe(11), writeContext);
- } catch (WriteFailedException.UpdateFailedException e) {
- assertEquals(UnsupportedOperationException.class, e.getCause().getClass());
- return;
- }
- fail("WriteFailedException.UpdateFailedException was expected");
+ customizer.updateCurrentAttributes(id, generateVxlanGpe(10), generateVxlanGpe(11), writeContext);
}
@Test
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/span/MirroredInterfacesCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/span/MirroredInterfacesCustomizerTest.java
index 998c81f8c..edf31a608 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/span/MirroredInterfacesCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/span/MirroredInterfacesCustomizerTest.java
@@ -84,12 +84,9 @@ public class MirroredInterfacesCustomizerTest extends WriterCustomizerTest {
assertCreateRequest(requestCaptor.getValue());
}
- @Test
+ @Test(expected = UnsupportedOperationException.class)
public void updateCurrentAttributes() throws Exception {
customizer.updateCurrentAttributes(validId, validData, validData, writeContext);
- verify(api, times(2)).swInterfaceSpanEnableDisable(requestCaptor.capture());
- assertDeleteRequest(requestCaptor.getAllValues().get(0));
- assertCreateRequest(requestCaptor.getAllValues().get(1));
}
@Test