From 1d5c19d8800d423f50cd4c59e1e84c674d98bb07 Mon Sep 17 00:00:00 2001 From: Sindhu A Date: Wed, 28 Mar 2018 15:48:17 +0000 Subject: UT for mso adapters vnf UT for mso adapters vnf BpelRestClient Issue-ID: SO-369 Change-Id: If3620ccba87f8f7e6bbe7bbde5e6a1bb220b65f2 Signed-off-by: Sindhu A --- .../mso/adapters/vnf/BpelRestClientTest.java | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/BpelRestClientTest.java (limited to 'adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso') diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/BpelRestClientTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/BpelRestClientTest.java new file mode 100644 index 0000000000..445ca54c21 --- /dev/null +++ b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/BpelRestClientTest.java @@ -0,0 +1,52 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. + * ================================================================================ + * 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 + *l + * 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. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.mso.adapters.vnf; + +import org.junit.Test; + +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertTrue; + +public class BpelRestClientTest { + + @Test + public void testBpelRestClient() { + + BpelRestClient test = new BpelRestClient(); + + assertEquals(test.getSocketTimeout(),5); + assertEquals(test.getConnectTimeout(),5); + assertEquals(test.getRetryCount(),5); + test.setRetryCount(6); + assertEquals(test.getRetryCount(),6); + assertEquals(test.getRetryInterval(),-15); + test.setRetryInterval(5); + assertEquals(test.getRetryInterval(),5); + test.setCredentials("credentials"); + assertEquals(test.getCredentials(),"credentials"); + test.setRetryList("1, 2, 3"); + assertEquals(test.getRetryList(),"1, 2, 3"); + assertEquals(test.getLastResponseCode(),0); + assertEquals(test.getLastResponse(),""); + assertTrue(test.bpelPost("bpelStr","url",true)); + + } +} -- cgit 1.2.3-korg