naming micro-service updates.
authorBT2983 <BT2983@att.com>
Mon, 17 Sep 2018 03:30:20 +0000 (21:30 -0600)
committerTimoney, Dan (dt5972) <dt5972@att.com>
Mon, 17 Sep 2018 16:35:14 +0000 (12:35 -0400)
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>
ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/ControllerBluprintsApplicationTest.java

index 58f3ccc..61b5c50 100644 (file)
@@ -48,20 +48,36 @@ public class ControllerBluprintsApplicationTest {
     private HttpHeaders headers;\r
     private ResponseEntity<ConfigModel> entity;\r
 \r
-\r
     @Before\r
     public void setUp(){\r
         headers = new HttpHeaders();\r
         headers.set("Accept", MediaType.APPLICATION_JSON_VALUE);\r
         entity = this.restTemplate\r
                 .exchange("/api/v1/config-model/1", HttpMethod.GET, new HttpEntity<>(headers),ConfigModel.class);\r
-\r
+        \r
     }\r
 \r
     @Test\r
     public void testConfigModel() {\r
+\r
+        HttpHeaders headers = new HttpHeaders();\r
+        headers.set("Accept", MediaType.APPLICATION_JSON_VALUE);\r
+        ResponseEntity<ConfigModel> entity = this.restTemplate\r
+                .exchange("/api/v1/config-model/1", HttpMethod.GET, new HttpEntity<>(headers),ConfigModel.class);\r
+\r
         assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);\r
         Assert.assertNotNull("failed to get response Config model",entity.getBody());\r
     }\r
 \r
+    @Test\r
+    public void testConfigModelFailure() {\r
+\r
+        HttpHeaders headers = new HttpHeaders();\r
+        headers.set("Accept", MediaType.APPLICATION_JSON_VALUE);\r
+        ResponseEntity<ConfigModel> entity = this.restTemplate\r
+                .exchange("/api/v1/config-model-not-found/1", HttpMethod.GET, new HttpEntity<>(headers),ConfigModel.class);\r
+\r
+        assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND);\r
+        Assert.assertNotNull("failed to get response Config model",entity.getBody());\r
+    }\r
 }\r