summaryrefslogtreecommitdiffstats
path: root/vnf-sdk-function-test/src/test/java/org
diff options
context:
space:
mode:
authorMurali-P <murali.p@huawei.com>2017-02-15 11:03:51 +0530
committerMurali-P <murali.p@huawei.com>2017-02-15 11:03:51 +0530
commit2f8abf5a6dd837b941c6f21a2d0290384b218d4a (patch)
treeb47e5a3116cd38db14c608b32e1150aabca0931d /vnf-sdk-function-test/src/test/java/org
parentc7c7fab17d0ba086d31036fc4395642c24335c56 (diff)
Update new UT Test cases
Resolved:VNFSDK-21 Function test base code Change-Id: I934a1337eb0d3820377297d57acbd4e79fce9f73 Signed-off-by: Murali-P <murali.p@huawei.com>
Diffstat (limited to 'vnf-sdk-function-test/src/test/java/org')
-rw-r--r--vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functest/resource/CommonManagerTest.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functest/resource/CommonManagerTest.java b/vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functest/resource/CommonManagerTest.java
index 8869ca3..99fced0 100644
--- a/vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functest/resource/CommonManagerTest.java
+++ b/vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functest/resource/CommonManagerTest.java
@@ -22,6 +22,7 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
+import java.net.URL;
import java.util.HashMap;
import java.util.Map;
@@ -54,9 +55,13 @@ public class CommonManagerTest {
public void testQueryResultWhenInstanceIdPresent() {
Map<String, String> mapConfigValues = new HashMap<String, String>();
- mapConfigValues.put("DIR_RESULT", ".\\src\\test\\resources");
+ String resultFolder = "59d1e651-df9f-4008-902f-e3b377e6ec30";
+ URL url = Thread.currentThread().getContextClassLoader().getResource(resultFolder);
+ File file = new File(url.getPath());
+ File parentFile = file.getParentFile();
+ mapConfigValues.put("DIR_RESULT", parentFile.getAbsolutePath());
VnfFuncTestResponseHandler.getInstance().setConfigMap(mapConfigValues);
- Response response = commonManger.queryResultByFuncTest("59d1e651-df9f-4008-902f-e3b377e6ec30");
+ Response response = commonManger.queryResultByFuncTest(resultFolder);
assertNotNull(response);
}