summaryrefslogtreecommitdiffstats
path: root/so-cnf-adapter-application/src/test/java
diff options
context:
space:
mode:
authorGrzegorz Wielgosinski <g.wielgosins@samsung.com>2021-06-01 09:22:54 +0200
committerGrzegorz Wielgosinski <g.wielgosins@samsung.com>2021-07-01 13:57:08 +0200
commit6a1528dbf366ba20ebfffb0e2fefe8557678a5ea (patch)
treea16b2ff5b29ac6ec671468476488ea8f40af32e3 /so-cnf-adapter-application/src/test/java
parent848e88dd7c810ba0c10b8b21ca15238b18291b0c (diff)
Add api /query multicloud proxy
Issue-ID: SO-3644 Signed-off-by: Grzegorz Wielgosinski <g.wielgosins@samsung.com> Change-Id: Ic112686748f7436ac65ae188d14b9ab74efb9202
Diffstat (limited to 'so-cnf-adapter-application/src/test/java')
-rw-r--r--so-cnf-adapter-application/src/test/java/org/onap/so/adapters/cnf/rest/CnfAdapterRestTest.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/so-cnf-adapter-application/src/test/java/org/onap/so/adapters/cnf/rest/CnfAdapterRestTest.java b/so-cnf-adapter-application/src/test/java/org/onap/so/adapters/cnf/rest/CnfAdapterRestTest.java
index a04d236..cfd6ba1 100644
--- a/so-cnf-adapter-application/src/test/java/org/onap/so/adapters/cnf/rest/CnfAdapterRestTest.java
+++ b/so-cnf-adapter-application/src/test/java/org/onap/so/adapters/cnf/rest/CnfAdapterRestTest.java
@@ -31,13 +31,13 @@ import org.onap.so.adapters.cnf.service.CnfAdapterService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.test.context.junit4.SpringRunner;
-import org.springframework.test.util.ReflectionTestUtils;
import org.springframework.web.multipart.MultipartFile;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static org.junit.Assert.assertEquals;
+import static org.assertj.core.api.Java6Assertions.assertThat;
@RunWith(SpringRunner.class)
@@ -135,6 +135,17 @@ public class CnfAdapterRestTest {
}
@Test
+ public void getInstanceQueryByInstanceIdTest() {
+ String instanceId = "123";
+ String queryResponseMock = "queryResponseMock";
+
+ Mockito.when(cnfAdapterService.getInstanceQueryByInstanceId(instanceId)).thenReturn(queryResponseMock);
+
+ String result = cnfAdapterRest.getInstanceQueryByInstanceId(instanceId);
+ assertThat(result).isEqualTo(queryResponseMock);
+ }
+
+ @Test
public void getInstanceByRBNameOrRBVersionOrProfileNameTest() throws Exception {
String rbName = "xyz";
@@ -560,3 +571,4 @@ public class CnfAdapterRestTest {
}
+