aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/test')
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/CallbackHeaderTest.java42
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/ObjectFactoryTest.java39
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/RequestHeaderTest.java45
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/RequestTunablesTest.java58
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/SDNCAdapterCallbackRequestTest.java41
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/SDNCAdapterRequestTest.java39
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/SDNCResponseTest.java43
7 files changed, 307 insertions, 0 deletions
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/CallbackHeaderTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/CallbackHeaderTest.java
new file mode 100644
index 0000000000..995bb5b19c
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/CallbackHeaderTest.java
@@ -0,0 +1,42 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : SO
+* ================================================================================
+* Copyright 2018 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+package org.openecomp.mso.client.sdnc.sync;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class CallbackHeaderTest {
+
+ CallbackHeader cbh = new CallbackHeader();
+ CallbackHeader cbh1 = new CallbackHeader("reqId", "respCode", "respMsg");
+
+ @Test
+ public void testCallbackHeader() {
+ cbh.setRequestId("requestId");
+ cbh.setResponseCode("responseCode");
+ cbh.setResponseMessage("responseMessage");
+ assertEquals(cbh.getRequestId(), "requestId");
+ assertEquals(cbh.getResponseCode(), "responseCode");
+ assertEquals(cbh.getResponseMessage(), "responseMessage");
+ assert(cbh.toString()!=null);
+ }
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/ObjectFactoryTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/ObjectFactoryTest.java
new file mode 100644
index 0000000000..04bc7dc132
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/ObjectFactoryTest.java
@@ -0,0 +1,39 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : SO
+* ================================================================================
+* Copyright 2018 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+package org.openecomp.mso.client.sdnc.sync;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class ObjectFactoryTest {
+ ObjectFactory of = new ObjectFactory();
+
+ @Test
+ public void testObjectFactory() {
+ of.createRequestHeader();
+ of.createSDNCAdapterRequest();
+ of.createSDNCAdapterResponse();
+
+
+ }
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/RequestHeaderTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/RequestHeaderTest.java
new file mode 100644
index 0000000000..1d04572207
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/RequestHeaderTest.java
@@ -0,0 +1,45 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : SO
+* ================================================================================
+* Copyright 2018 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+package org.openecomp.mso.client.sdnc.sync;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class RequestHeaderTest {
+ RequestHeader rh = new RequestHeader();
+
+ @Test
+ public void testRequestHeader() {
+ rh.setRequestId("requestId");
+ rh.setSvcInstanceId("svcInstanceId");
+ rh.setSvcAction("svcAction");
+ rh.setSvcOperation("svcOperation");
+ rh.setCallbackUrl("callbackUrl");
+ rh.setMsoAction("msoAction");
+ assertEquals(rh.getRequestId(), "requestId");
+ assertEquals(rh.getSvcInstanceId(), "svcInstanceId");
+ assertEquals(rh.getSvcAction(), "svcAction");
+ assertEquals(rh.getSvcOperation(), "svcOperation");
+ assertEquals(rh.getCallbackUrl(), "callbackUrl");
+ assertEquals(rh.getMsoAction(), "msoAction");
+ assert(rh.toString()!=null);
+ }
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/RequestTunablesTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/RequestTunablesTest.java
new file mode 100644
index 0000000000..1219f69874
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/RequestTunablesTest.java
@@ -0,0 +1,58 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : SO
+* ================================================================================
+* Copyright 2018 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+package org.openecomp.mso.client.sdnc.sync;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+
+public class RequestTunablesTest {
+ MsoPropertiesFactory mpf = new MsoPropertiesFactory();
+
+ RequestTunables rt = new RequestTunables("reqId", "msoAction", "operation", "action", mpf);
+
+ @Test
+ public void testRequestTunables() {
+ rt.setReqId("reqId");
+ rt.setReqMethod("reqMethod");
+ rt.setMsoAction("msoAction");
+ rt.setAction("action");
+ rt.setOperation("operation");
+ rt.setSdncUrl("sdncUrl");
+ rt.setTimeout("timeout");
+ rt.setAsyncInd("asyncInd");
+ rt.setHeaderName("headerName");
+ rt.setSdncaNotificationUrl("sdncaNotificationUrl");
+ rt.setNamespace("namespace");
+ assertEquals(rt.getReqId(), "reqId");
+ assertEquals(rt.getReqMethod(), "reqMethod");
+ assertEquals(rt.getMsoAction(), "msoAction");
+ assertEquals(rt.getAction(), "action");
+ assertEquals(rt.getOperation(), "operation");
+ assertEquals(rt.getSdncUrl(), "sdncUrl");
+ assertEquals(rt.getTimeout(), "timeout");
+ assertEquals(rt.getAsyncInd(), "asyncInd");
+ assertEquals(rt.getHeaderName(), "headerName");
+ assertEquals(rt.getSdncaNotificationUrl(), "sdncaNotificationUrl");
+ assertEquals(rt.getNamespace(), "namespace");
+ assert(rt.toString()!=null);
+ }
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/SDNCAdapterCallbackRequestTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/SDNCAdapterCallbackRequestTest.java
new file mode 100644
index 0000000000..53fbb0a4aa
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/SDNCAdapterCallbackRequestTest.java
@@ -0,0 +1,41 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : SO
+* ================================================================================
+* Copyright 2018 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+package org.openecomp.mso.client.sdnc.sync;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class SDNCAdapterCallbackRequestTest {
+
+ SDNCAdapterCallbackRequest sdnccall = new SDNCAdapterCallbackRequest();
+ CallbackHeader cbh = new CallbackHeader();
+ Object o = new Object();
+
+ @Test
+ public void testSDNCAdapterCallbackRequest() {
+ sdnccall.setCallbackHeader(cbh);
+ sdnccall.setRequestData(o);
+ assertEquals(sdnccall.getCallbackHeader(), cbh);
+ assertEquals(sdnccall.getRequestData(), o);
+ assert(sdnccall.toString()!=null);
+ }
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/SDNCAdapterRequestTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/SDNCAdapterRequestTest.java
new file mode 100644
index 0000000000..6b10f25e70
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/SDNCAdapterRequestTest.java
@@ -0,0 +1,39 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : SO
+* ================================================================================
+* Copyright 2018 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+package org.openecomp.mso.client.sdnc.sync;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class SDNCAdapterRequestTest {
+
+ SDNCAdapterRequest adapter = new SDNCAdapterRequest();
+ RequestHeader rh = new RequestHeader();
+ Object o = new Object();
+
+ @Test
+ public void testSDNCAdapterRequest() {
+ adapter.setRequestHeader(rh);
+ adapter.setRequestData(o);
+ assertEquals(adapter.getRequestHeader(), rh);
+ assertEquals(adapter.getRequestData(), o);
+ }
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/SDNCResponseTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/SDNCResponseTest.java
new file mode 100644
index 0000000000..d8c23249c4
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/sdnc/sync/SDNCResponseTest.java
@@ -0,0 +1,43 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : SO
+* ================================================================================
+* Copyright 2018 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+package org.openecomp.mso.client.sdnc.sync;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class SDNCResponseTest {
+
+ SDNCResponse sdnc = new SDNCResponse("reqId");
+ SDNCResponse sdnc1 = new SDNCResponse("reqId", 0, "respMsg");
+
+ @Test
+ public void testSDNCResponse() {
+ sdnc.setReqId("reqId");
+ sdnc.setRespCode(0);
+ sdnc.setRespMsg("respMsg");
+ sdnc.setSdncResp("sdncResp");
+ assertEquals(sdnc.getReqId(), "reqId");
+ assertEquals(sdnc.getRespCode(), 0);
+ assertEquals(sdnc.getRespMsg(), "respMsg");
+ assertEquals(sdnc.getSdncResp(), "sdncResp");
+ assert(sdnc.toString()!= null);
+ }
+}