diff options
author | Ittay Stern <ittay.stern@att.com> | 2019-03-11 09:34:34 +0200 |
---|---|---|
committer | Ittay Stern <ittay.stern@att.com> | 2019-03-17 17:02:43 +0200 |
commit | 66af8b9b391879be78660d6ccb0a1f1f9340b423 (patch) | |
tree | fc0d510f7ea28a437bcb1e3b950d1281ac88a4e4 /vid-automation/src/test/java/org/onap/vid/api/VersionControllerApiTest.java | |
parent | 37ad0cc1d36ec6ff68ec39fcaaf2617eef7d08fe (diff) |
Merge automation from ECOMP's repository
Reference commit in ECOMP: 8e92a8c6
Issue-ID: VID-378
Change-Id: Ia32f4813378ef95097f788246aa5b1172e20ca48
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-automation/src/test/java/org/onap/vid/api/VersionControllerApiTest.java')
-rw-r--r-- | vid-automation/src/test/java/org/onap/vid/api/VersionControllerApiTest.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/vid-automation/src/test/java/org/onap/vid/api/VersionControllerApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/VersionControllerApiTest.java new file mode 100644 index 000000000..4dc799193 --- /dev/null +++ b/vid-automation/src/test/java/org/onap/vid/api/VersionControllerApiTest.java @@ -0,0 +1,26 @@ +package org.onap.vid.api; + +import org.junit.Assert; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.http.ResponseEntity; +import org.springframework.web.client.RestTemplate; +import org.testng.annotations.Test; + +import java.util.HashMap; + +public class VersionControllerApiTest extends BaseApiTest { + + @Test + public void probeRequest_returnsResponseAsExpected() { + // without log-in + ResponseEntity<HashMap<String, String>> response = new RestTemplate().exchange( + uri + "/version", + org.springframework.http.HttpMethod.GET, + null, + new ParameterizedTypeReference<HashMap<String, String>>() { + }); + HashMap<String,String> versionResults = response.getBody(); + Assert.assertNotNull(versionResults.get("features")); + Assert.assertNotNull(versionResults.get("build")); + } +} |