From b8cf23cd61c2d3f57f9450570236534bce69232e Mon Sep 17 00:00:00 2001 From: Jan Srnicek Date: Tue, 15 Aug 2017 11:30:28 +0200 Subject: HONEYCOMB-386 - Hc2vpp Customizers update Utilizes new default update implementation Change-Id: I9bf8473336274ba5fcfc18804f7b414937b3708e Signed-off-by: Jan Srnicek --- .../iface/acl/AclInterfaceAssignmentRequestTest.java | 19 ------------------- .../acl/write/InterfaceAclMacipCustomizerTest.java | 3 +-- 2 files changed, 1 insertion(+), 21 deletions(-) (limited to 'acl/acl-impl/src/test/java') diff --git a/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/util/iface/acl/AclInterfaceAssignmentRequestTest.java b/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/util/iface/acl/AclInterfaceAssignmentRequestTest.java index 3427dc7fd..fb5d61458 100644 --- a/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/util/iface/acl/AclInterfaceAssignmentRequestTest.java +++ b/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/util/iface/acl/AclInterfaceAssignmentRequestTest.java @@ -115,7 +115,6 @@ public class AclInterfaceAssignmentRequestTest implements NamingContextHelper, F private void verifyVariant(final AclInterfaceAssignmentRequest request) throws WriteFailedException { verifyCreateFailsWithNullPointer(request); - verifyUpdateFailsWithNullPointer(request); verifyDeleteFailsWithNullPointer(request); } @@ -127,14 +126,6 @@ public class AclInterfaceAssignmentRequestTest implements NamingContextHelper, F verifyValidRequest(requestCaptor.getValue()); } - @Test - public void executeAsUpdate() throws Exception { - createValidRequest().executeAsUpdate(api, mock(Acl.class), mock(Acl.class)); - - verify(api).aclInterfaceSetAclList(requestCaptor.capture()); - verifyValidRequest(requestCaptor.getValue()); - } - @Test public void executeAsDelete() throws Exception { create(mappingContext) @@ -190,16 +181,6 @@ public class AclInterfaceAssignmentRequestTest implements NamingContextHelper, F fail("Test should have thrown null pointer"); } - private void verifyUpdateFailsWithNullPointer(final AclInterfaceAssignmentRequest request) - throws WriteFailedException { - try { - request.executeAsUpdate(api, mock(Acl.class), mock(Acl.class)); - } catch (NullPointerException e) { - return; - } - fail("Test should have thrown null pointer"); - } - private void verifyDeleteFailsWithNullPointer(final AclInterfaceAssignmentRequest request) throws WriteFailedException { try { diff --git a/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/write/InterfaceAclMacipCustomizerTest.java b/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/write/InterfaceAclMacipCustomizerTest.java index 5bf66d894..b5fa649ca 100644 --- a/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/write/InterfaceAclMacipCustomizerTest.java +++ b/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/write/InterfaceAclMacipCustomizerTest.java @@ -24,7 +24,6 @@ import io.fd.hc2vpp.acl.AclTestSchemaContext; import io.fd.hc2vpp.acl.util.AclContextManager; import io.fd.hc2vpp.common.test.write.WriterCustomizerTest; import io.fd.hc2vpp.common.translate.util.NamingContext; -import io.fd.honeycomb.translate.write.WriteFailedException; import io.fd.vpp.jvpp.acl.dto.MacipAclInterfaceAddDel; import io.fd.vpp.jvpp.acl.dto.MacipAclInterfaceAddDelReply; import io.fd.vpp.jvpp.acl.future.FutureJVppAclFacade; @@ -80,7 +79,7 @@ public class InterfaceAclMacipCustomizerTest extends WriterCustomizerTest implem verify(aclApi).macipAclInterfaceAddDel(request); } - @Test(expected = WriteFailedException.UpdateFailedException.class) + @Test(expected = UnsupportedOperationException.class) public void testUpdate() throws Exception { customizer.updateCurrentAttributes(ACL_IID, acl, acl, writeContext); } -- cgit 1.2.3-korg