From aa7486577fb66e85a5bb220438946579695b27b8 Mon Sep 17 00:00:00 2001 From: "Singal, Kapil (ks220y)" Date: Thu, 9 Aug 2018 20:47:29 +0000 Subject: Controller Blueprints MS Creating the base directory structure for Controller Blueprints MicroService Change-Id: I1ccf7fc76446048af3b2822f9155bb634657aee3 Issue-ID: CCSDK-410 Signed-off-by: Singal, Kapil (ks220y) --- .../ControllerBluprintsApplicationTest.java | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/ControllerBluprintsApplicationTest.java (limited to 'ms/controllerblueprints/application/src/test/java') 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 new file mode 100644 index 00000000..4bdbde00 --- /dev/null +++ b/ms/controllerblueprints/application/src/test/java/org/onap/ccsdk/apps/controllerblueprints/ControllerBluprintsApplicationTest.java @@ -0,0 +1,54 @@ +/* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.ccsdk.apps.controllerblueprints; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; +import org.springframework.boot.test.web.client.TestRestTemplate; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.test.context.junit4.SpringRunner; + +import static org.assertj.core.api.Assertions.assertThat; + +@RunWith(SpringRunner.class) +@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) +public class ControllerBluprintsApplicationTest { + private static Logger log = LoggerFactory.getLogger(ControllerBluprintsApplicationTest.class); + + @Autowired + private TestRestTemplate restTemplate; + + @Before + public void setUp(){ + + } + + @Test + public void testConfigModel() { + + ResponseEntity entity = this.restTemplate + .getForEntity("/api/controller-blueprints/v1/service/configmodel/1", String.class); + assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK); + } +} -- cgit 1.2.3-korg