diff options
author | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2018-03-28 17:09:21 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-03-28 17:09:21 +0000 |
commit | b6e511608b71064a3379a3148cf6f12f21f68e86 (patch) | |
tree | c8ceb283e275f14f2b8db5b77d795d8e5d579e7d | |
parent | 1f8f50733aaaa103cdb7e34099179cba436f754c (diff) | |
parent | 1d5c19d8800d423f50cd4c59e1e84c674d98bb07 (diff) |
Merge "UT for mso adapters vnf"
-rw-r--r-- | adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/BpelRestClientTest.java | 52 |
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)); + + } +} |