summaryrefslogtreecommitdiffstats
path: root/src/test/java
diff options
context:
space:
mode:
authorromaingimbert <romain.gimbert@orange.com>2018-09-14 14:52:20 +0200
committerromaingimbert <romain.gimbert@orange.com>2018-09-14 14:52:20 +0200
commit8f141d17f3ea7720df479f4ae51b5a2e169548cb (patch)
tree4d309f3d24202153d6ad50dfa41c2d8ee99b70c2 /src/test/java
parent956d451af5e5ad5b5f0bbca34c5462455cc6d0ad (diff)
Add API Documentation for Casablanca
-update docs -update version related code -change properties MSB Change-Id: I7fb2a257ec035c53e93666d7571a2c74a0624524 Issue-ID: EXTAPI-141 Signed-off-by: romaingimbert <romain.gimbert@orange.com>
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/onap/nbi/apis/StatusResourceTest.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/test/java/org/onap/nbi/apis/StatusResourceTest.java b/src/test/java/org/onap/nbi/apis/StatusResourceTest.java
index d9309be..9b80745 100644
--- a/src/test/java/org/onap/nbi/apis/StatusResourceTest.java
+++ b/src/test/java/org/onap/nbi/apis/StatusResourceTest.java
@@ -22,6 +22,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.onap.nbi.apis.status.StatusResource;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
@@ -37,12 +38,18 @@ public class StatusResourceTest {
@Autowired
StatusResource statusResource;
+ @Value("${server.contextPath}")
+ String contextPath;
+
+ @Value("${nbi.version}")
+ String version;
+
private MockHttpServletRequest request;
@Before
public void setup() {
request = new MockHttpServletRequest();
- request.setRequestURI("/nbi/api/v1/status");
+ request.setRequestURI(contextPath);
}
@Test
@@ -52,6 +59,6 @@ public class StatusResourceTest {
ObjectNode status = (ObjectNode) response.getBody();
assertThat(status.get("name").textValue()).isEqualTo("nbi");
assertThat(status.get("status").toString()).isEqualTo("OK");
- assertThat(status.get("version").textValue()).isEqualTo("v1");
+ assertThat(status.get("version").textValue()).isEqualTo(version);
}
}