From c7c7fab17d0ba086d31036fc4395642c24335c56 Mon Sep 17 00:00:00 2001 From: Murali-P Date: Tue, 14 Feb 2017 20:40:25 +0530 Subject: Add/Update new UT Test cases Resolved:VNFSDK-21 Function test base code Change-Id: I74f57856a23ec83fbc5716d6507262a9594df666 Signed-off-by: Murali-P --- .../functest/resource/CommonManagerTest.java | 7 ++++++ .../VnfSdkFuncTestAppConfigurationTest.java | 29 ++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functests/VnfSdkFuncTestAppConfigurationTest.java (limited to 'vnf-sdk-function-test/src/test') 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 9336abf..8869ca3 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,11 +22,14 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStream; +import java.util.HashMap; +import java.util.Map; import javax.ws.rs.core.Response; import org.junit.Before; import org.junit.Test; +import org.openo.vnfsdk.functest.responsehandler.VnfFuncTestResponseHandler; public class CommonManagerTest { @@ -49,6 +52,10 @@ public class CommonManagerTest { @Test public void testQueryResultWhenInstanceIdPresent() { + + Map mapConfigValues = new HashMap(); + mapConfigValues.put("DIR_RESULT", ".\\src\\test\\resources"); + VnfFuncTestResponseHandler.getInstance().setConfigMap(mapConfigValues); Response response = commonManger.queryResultByFuncTest("59d1e651-df9f-4008-902f-e3b377e6ec30"); assertNotNull(response); } diff --git a/vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functests/VnfSdkFuncTestAppConfigurationTest.java b/vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functests/VnfSdkFuncTestAppConfigurationTest.java new file mode 100644 index 0000000..4c06c1f --- /dev/null +++ b/vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functests/VnfSdkFuncTestAppConfigurationTest.java @@ -0,0 +1,29 @@ +/* + * Copyright 2017 Huawei Technologies Co., Ltd. + * + * 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.openo.vnfsdk.functests; + +import org.junit.Test; +import org.openo.vnfsdk.functest.VnfSdkFuncTestAppConfiguration; + +public class VnfSdkFuncTestAppConfigurationTest { + + @Test + public void vnfSdkFuncTestBean() { + VnfSdkFuncTestAppConfiguration vnfSdkBean = new VnfSdkFuncTestAppConfiguration(); + } + +} -- cgit 1.2.3-korg