aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSindhu A <arcot.sindhuri@huawei.com>2018-03-28 15:48:17 +0000
committerSindhu A <arcot.sindhuri@huawei.com>2018-03-28 15:49:37 +0000
commit1d5c19d8800d423f50cd4c59e1e84c674d98bb07 (patch)
tree8b9751568a38953c7c6f831a780f6e989737fba0
parent4e651eb259dac4188e1568ac65e69d68a91e6296 (diff)
UT for mso adapters vnf
UT for mso adapters vnf BpelRestClient Issue-ID: SO-369 Change-Id: If3620ccba87f8f7e6bbe7bbde5e6a1bb220b65f2 Signed-off-by: Sindhu A <arcot.sindhuri@huawei.com>
-rw-r--r--adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/BpelRestClientTest.java52
1 files changed, 52 insertions, 0 deletions
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));
+
+ }
+}