diff options
author | Jim Hahn <jrh3@att.com> | 2020-03-03 21:02:13 -0500 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2020-03-05 15:42:01 -0500 |
commit | 03248c4de4197dac33c156e6a7a6538c9943305c (patch) | |
tree | 3224aa774d09649ed83d91a9a36f9bd969e701cf /models-interactions/model-actors/actor.test/src | |
parent | 7f1903bae3069d5e14b4c322c09c1317d90114b6 (diff) |
Add SO VF Module Delete Operation
Redesigned the SO Operation classes; moved some code from the subclass
to the superclass so it could be reused by the VF Module Delete Operation.
JerseyClient does not support DELETE with a request body, so had to
implement a delete() method using java11 HttpClient.
Fix some issues found while testing with drools-apps.
Added "delete" operation to SO simulator.
Issue-ID: POLICY-2371
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I269fe13cf90c295ec2bbac92bc5a59b3820ea265
Diffstat (limited to 'models-interactions/model-actors/actor.test/src')
-rw-r--r-- | models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicHttpOperation.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicHttpOperation.java b/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicHttpOperation.java index 6228756bd..81156c184 100644 --- a/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicHttpOperation.java +++ b/models-interactions/model-actors/actor.test/src/main/java/org/onap/policy/controlloop/actor/test/BasicHttpOperation.java @@ -30,6 +30,7 @@ import javax.ws.rs.client.Entity; import javax.ws.rs.client.Invocation.Builder; import javax.ws.rs.client.InvocationCallback; import javax.ws.rs.client.WebTarget; +import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.mockito.ArgumentCaptor; import org.mockito.Captor; @@ -101,6 +102,8 @@ public class BasicHttpOperation<Q> extends BasicOperation { when(rawResponse.getStatus()).thenReturn(200); when(webBuilder.async()).thenReturn(webAsync); + when(webBuilder.accept(any(MediaType.class))).thenReturn(webBuilder); + when(webBuilder.accept(any(String.class))).thenReturn(webBuilder); when(webTarget.request()).thenReturn(webBuilder); when(webTarget.path(any())).thenReturn(webTarget); |