aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-requests-db/src/test/java/org
diff options
context:
space:
mode:
authorMnushkin, Dmitry <dmitry.mnushkin@att.com>2019-11-04 08:17:31 -0500
committerBenjamin, Max (mb388a) <mb388a@att.com>2019-11-04 08:17:31 -0500
commitf39c458844188866d9c0cd7bbd59ce8f15b66cb7 (patch)
treebb17b8cc5b87f6681ea2086702204f6ce5e37a72 /mso-api-handlers/mso-requests-db/src/test/java/org
parent47cb6260f222c2f0cb0c95a53646e3196a930a8b (diff)
Add patch method
add patch method to requests db client remove null values from junit mock matching Issue-ID: SO-2506 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I3d6c0b05943958a9e77557cbf643a90cf5bb556b
Diffstat (limited to 'mso-api-handlers/mso-requests-db/src/test/java/org')
-rw-r--r--mso-api-handlers/mso-requests-db/src/test/java/org/onap/so/db/request/client/RequestDbClientTest.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/mso-api-handlers/mso-requests-db/src/test/java/org/onap/so/db/request/client/RequestDbClientTest.java b/mso-api-handlers/mso-requests-db/src/test/java/org/onap/so/db/request/client/RequestDbClientTest.java
index fdbc04acb4..fff6ad1013 100644
--- a/mso-api-handlers/mso-requests-db/src/test/java/org/onap/so/db/request/client/RequestDbClientTest.java
+++ b/mso-api-handlers/mso-requests-db/src/test/java/org/onap/so/db/request/client/RequestDbClientTest.java
@@ -10,8 +10,10 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.junit.MockitoJUnitRunner;
+import org.onap.so.db.request.beans.InfraActiveRequests;
import org.onap.so.db.request.beans.RequestProcessingData;
import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpMethod;
import org.springframework.web.client.RestTemplate;
@@ -32,4 +34,14 @@ public class RequestDbClientTest {
requestsDbClient.updateRequestProcessingData(requestProcessingData);
Mockito.verify(restTemplate, times(1)).put(eq(uri), isA(HttpEntity.class));
}
+
+ @Test
+ public void updateInfraActiveRequestsTest() {
+ InfraActiveRequests request = new InfraActiveRequests();
+ request.setRequestId("1");
+ URI uri = URI.create("/infraActiveRequests/1");
+ requestsDbClient.patchInfraActiveRequests(request);
+ Mockito.verify(restTemplate, times(1)).exchange(eq(uri), eq(HttpMethod.PATCH), isA(HttpEntity.class),
+ eq(String.class));
+ }
}