aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-requests-db/src/test
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-11-04 14:48:07 +0000
committerGerrit Code Review <gerrit@onap.org>2019-11-04 14:48:07 +0000
commitb01d4d9077c4fdbb29702d59581115e2dcb2d90e (patch)
tree5ca7a3311013ed3a88c5cdd36a3f5b6f622045f8 /mso-api-handlers/mso-requests-db/src/test
parentc7808c6ba90b621a96061337ce6b0811b636fa1a (diff)
parentf39c458844188866d9c0cd7bbd59ce8f15b66cb7 (diff)
Merge "Add patch method"
Diffstat (limited to 'mso-api-handlers/mso-requests-db/src/test')
-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));
+ }
}