--- /dev/null
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+package org.openecomp.mso.client.sdnc.sync;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+import org.junit.Test;\r
+\r
+public class CallbackHeaderTest {\r
+ \r
+ CallbackHeader cbh = new CallbackHeader();\r
+ CallbackHeader cbh1 = new CallbackHeader("reqId", "respCode", "respMsg");\r
+\r
+ @Test\r
+ public void testCallbackHeader() {\r
+ cbh.setRequestId("requestId");\r
+ cbh.setResponseCode("responseCode");\r
+ cbh.setResponseMessage("responseMessage");\r
+ assertEquals(cbh.getRequestId(), "requestId");\r
+ assertEquals(cbh.getResponseCode(), "responseCode");\r
+ assertEquals(cbh.getResponseMessage(), "responseMessage");\r
+ assert(cbh.toString()!=null);\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+\r
+package org.openecomp.mso.client.sdnc.sync;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+import org.junit.Test;\r
+\r
+public class ObjectFactoryTest {\r
+ ObjectFactory of = new ObjectFactory();\r
+\r
+ @Test\r
+ public void testObjectFactory() {\r
+ of.createRequestHeader();\r
+ of.createSDNCAdapterRequest();\r
+ of.createSDNCAdapterResponse();\r
+ \r
+ \r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+package org.openecomp.mso.client.sdnc.sync;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+import org.junit.Test;\r
+\r
+public class RequestHeaderTest {\r
+ RequestHeader rh = new RequestHeader();\r
+\r
+ @Test\r
+ public void testRequestHeader() {\r
+ rh.setRequestId("requestId");\r
+ rh.setSvcInstanceId("svcInstanceId");\r
+ rh.setSvcAction("svcAction");\r
+ rh.setSvcOperation("svcOperation");\r
+ rh.setCallbackUrl("callbackUrl");\r
+ rh.setMsoAction("msoAction");\r
+ assertEquals(rh.getRequestId(), "requestId");\r
+ assertEquals(rh.getSvcInstanceId(), "svcInstanceId");\r
+ assertEquals(rh.getSvcAction(), "svcAction");\r
+ assertEquals(rh.getSvcOperation(), "svcOperation");\r
+ assertEquals(rh.getCallbackUrl(), "callbackUrl");\r
+ assertEquals(rh.getMsoAction(), "msoAction");\r
+ assert(rh.toString()!=null); \r
+ }\r
+}\r
--- /dev/null
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+package org.openecomp.mso.client.sdnc.sync;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+import org.junit.Test;\r
+import org.openecomp.mso.properties.MsoPropertiesFactory;\r
+\r
+public class RequestTunablesTest {\r
+ MsoPropertiesFactory mpf = new MsoPropertiesFactory();\r
+ \r
+ RequestTunables rt = new RequestTunables("reqId", "msoAction", "operation", "action", mpf);\r
+\r
+ @Test\r
+ public void testRequestTunables() {\r
+ rt.setReqId("reqId");\r
+ rt.setReqMethod("reqMethod");\r
+ rt.setMsoAction("msoAction");\r
+ rt.setAction("action");\r
+ rt.setOperation("operation");\r
+ rt.setSdncUrl("sdncUrl");\r
+ rt.setTimeout("timeout");\r
+ rt.setAsyncInd("asyncInd");\r
+ rt.setHeaderName("headerName");\r
+ rt.setSdncaNotificationUrl("sdncaNotificationUrl");\r
+ rt.setNamespace("namespace");\r
+ assertEquals(rt.getReqId(), "reqId");\r
+ assertEquals(rt.getReqMethod(), "reqMethod");\r
+ assertEquals(rt.getMsoAction(), "msoAction");\r
+ assertEquals(rt.getAction(), "action");\r
+ assertEquals(rt.getOperation(), "operation");\r
+ assertEquals(rt.getSdncUrl(), "sdncUrl");\r
+ assertEquals(rt.getTimeout(), "timeout");\r
+ assertEquals(rt.getAsyncInd(), "asyncInd");\r
+ assertEquals(rt.getHeaderName(), "headerName");\r
+ assertEquals(rt.getSdncaNotificationUrl(), "sdncaNotificationUrl");\r
+ assertEquals(rt.getNamespace(), "namespace");\r
+ assert(rt.toString()!=null); \r
+ }\r
+}\r
--- /dev/null
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+package org.openecomp.mso.client.sdnc.sync;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+import org.junit.Test;\r
+\r
+public class SDNCAdapterCallbackRequestTest {\r
+ \r
+ SDNCAdapterCallbackRequest sdnccall = new SDNCAdapterCallbackRequest();\r
+ CallbackHeader cbh = new CallbackHeader();\r
+ Object o = new Object();\r
+\r
+ @Test\r
+ public void testSDNCAdapterCallbackRequest() {\r
+ sdnccall.setCallbackHeader(cbh);\r
+ sdnccall.setRequestData(o);\r
+ assertEquals(sdnccall.getCallbackHeader(), cbh);\r
+ assertEquals(sdnccall.getRequestData(), o);\r
+ assert(sdnccall.toString()!=null); \r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+package org.openecomp.mso.client.sdnc.sync;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+import org.junit.Test;\r
+\r
+public class SDNCAdapterRequestTest {\r
+ \r
+ SDNCAdapterRequest adapter = new SDNCAdapterRequest();\r
+ RequestHeader rh = new RequestHeader();\r
+ Object o = new Object();\r
+\r
+ @Test\r
+ public void testSDNCAdapterRequest() {\r
+ adapter.setRequestHeader(rh);\r
+ adapter.setRequestData(o);\r
+ assertEquals(adapter.getRequestHeader(), rh);\r
+ assertEquals(adapter.getRequestData(), o);\r
+ }\r
+}\r
--- /dev/null
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : SO\r
+* ================================================================================\r
+* Copyright 2018 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+package org.openecomp.mso.client.sdnc.sync;\r
+\r
+import static org.junit.Assert.*;\r
+\r
+import org.junit.Test;\r
+\r
+public class SDNCResponseTest {\r
+ \r
+ SDNCResponse sdnc = new SDNCResponse("reqId");\r
+ SDNCResponse sdnc1 = new SDNCResponse("reqId", 0, "respMsg");\r
+\r
+ @Test\r
+ public void testSDNCResponse() {\r
+ sdnc.setReqId("reqId");\r
+ sdnc.setRespCode(0);\r
+ sdnc.setRespMsg("respMsg");\r
+ sdnc.setSdncResp("sdncResp");\r
+ assertEquals(sdnc.getReqId(), "reqId");\r
+ assertEquals(sdnc.getRespCode(), 0);\r
+ assertEquals(sdnc.getRespMsg(), "respMsg");\r
+ assertEquals(sdnc.getSdncResp(), "sdncResp");\r
+ assert(sdnc.toString()!= null); \r
+ }\r
+}\r