aboutsummaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/application/src/test
diff options
context:
space:
mode:
authorBT2983 <BT2983@att.com>2018-09-16 21:30:20 -0600
committerTimoney, Dan (dt5972) <dt5972@att.com>2018-09-17 12:35:14 -0400
commit9783a8b7515eaaec310e404650d0dd9092eb90a8 (patch)
tree90101018aa23a5e91c0d9f85aec0fa5ff407e184 /ms/controllerblueprints/application/src/test
parent4f44000fef9608150811e0b9f9b140c580f5822b (diff)
naming micro-service updates.
More tests, changes for maria DB, support for UUID and timestamp etc. Change-Id: I17bdf3acbe970ef4104f2ec0d59d5777c0a9928e Issue-ID: CCSDK-342 Signed-off-by: BT2983 <BT2983@att.com>
Diffstat (limited to 'ms/controllerblueprints/application/src/test')
-rw-r--r--ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/ControllerBluprintsApplicationTest.java20
1 files changed, 18 insertions, 2 deletions
diff --git a/ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/ControllerBluprintsApplicationTest.java b/ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/ControllerBluprintsApplicationTest.java
index 58f3ccc3..61b5c50f 100644
--- a/ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/ControllerBluprintsApplicationTest.java
+++ b/ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/ControllerBluprintsApplicationTest.java
@@ -48,20 +48,36 @@ public class ControllerBluprintsApplicationTest {
private HttpHeaders headers;
private ResponseEntity<ConfigModel> entity;
-
@Before
public void setUp(){
headers = new HttpHeaders();
headers.set("Accept", MediaType.APPLICATION_JSON_VALUE);
entity = this.restTemplate
.exchange("/api/v1/config-model/1", HttpMethod.GET, new HttpEntity<>(headers),ConfigModel.class);
-
+
}
@Test
public void testConfigModel() {
+
+ HttpHeaders headers = new HttpHeaders();
+ headers.set("Accept", MediaType.APPLICATION_JSON_VALUE);
+ ResponseEntity<ConfigModel> entity = this.restTemplate
+ .exchange("/api/v1/config-model/1", HttpMethod.GET, new HttpEntity<>(headers),ConfigModel.class);
+
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
Assert.assertNotNull("failed to get response Config model",entity.getBody());
}
+ @Test
+ public void testConfigModelFailure() {
+
+ HttpHeaders headers = new HttpHeaders();
+ headers.set("Accept", MediaType.APPLICATION_JSON_VALUE);
+ ResponseEntity<ConfigModel> entity = this.restTemplate
+ .exchange("/api/v1/config-model-not-found/1", HttpMethod.GET, new HttpEntity<>(headers),ConfigModel.class);
+
+ assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND);
+ Assert.assertNotNull("failed to get response Config model",entity.getBody());
+ }
}