From 72fc2ae612af808ae81182cd782aa35b399482ce Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Mon, 4 Dec 2017 17:30:44 -0500 Subject: Remove duplicate test A junit test called VnfApiProviderTest.java should be removed to avoid confusion with vnfApiProviderTest.java. On Windows and Mac OSX, those file names are treated as duplicates. Change-Id: Ia98f19b6c523a57df3fcf5675fb903310ea7f421 Issue-ID: SDNC-212 Signed-off-by: Dan Timoney --- .../org/onap/sdnc/vnfapi/VnfApiProviderTest.java | 75 --------------------- .../onap/sdnc/vnfapi/VnfApiProviderTestBase.java | 76 ++++++++++++++++++++++ .../sdnc/vnfapi/VnfTopologyOperationRPCTest.java | 2 +- 3 files changed, 77 insertions(+), 76 deletions(-) delete mode 100644 vnfapi/provider/src/test/java/org/onap/sdnc/vnfapi/VnfApiProviderTest.java create mode 100644 vnfapi/provider/src/test/java/org/onap/sdnc/vnfapi/VnfApiProviderTestBase.java (limited to 'vnfapi/provider/src') diff --git a/vnfapi/provider/src/test/java/org/onap/sdnc/vnfapi/VnfApiProviderTest.java b/vnfapi/provider/src/test/java/org/onap/sdnc/vnfapi/VnfApiProviderTest.java deleted file mode 100644 index c74ce534..00000000 --- a/vnfapi/provider/src/test/java/org/onap/sdnc/vnfapi/VnfApiProviderTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. 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 - * - * 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.onap.sdnc.vnfapi; - -import org.junit.Before; -import org.mockito.Mock; -import org.onap.sdnc.vnfapi.util.DataBrokerUtil; -import org.onap.sdnc.vnfapi.util.PropBuilder; -import org.onap.sdnc.vnfapi.util.VNFSDNSvcLogicServiceClientMockUtil; -import org.opendaylight.controller.md.sal.binding.api.DataBroker; -import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; -import org.opendaylight.controller.md.sal.binding.test.AbstractConcurrentDataBrokerTest; -import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - - -public class VnfApiProviderTest extends AbstractConcurrentDataBrokerTest { - - protected vnfapiProvider vnfapiProvider; - protected DataBroker dataBroker; - protected @Mock NotificationPublishService mockNotificationPublishService; - protected @Mock RpcProviderRegistry mockRpcProviderRegistry; - protected @Mock VNFSDNSvcLogicServiceClient mockVNFSDNSvcLogicServiceClient; - protected static final Logger LOG = LoggerFactory.getLogger(vnfapiProvider.class); - - - protected DataBrokerUtil db; - protected VNFSDNSvcLogicServiceClientMockUtil svcClient; - - - @Before - public void setUp() throws Exception { - svcClient = new VNFSDNSvcLogicServiceClientMockUtil(mockVNFSDNSvcLogicServiceClient); - dataBroker = getDataBroker(); - db = new DataBrokerUtil(dataBroker); - try { - vnfapiProvider = new vnfapiProvider( - dataBroker, - mockNotificationPublishService, - mockRpcProviderRegistry, - mockVNFSDNSvcLogicServiceClient - ); - } catch (Exception e) { - LOG.error("Caught exception on setUp", e); - throw e; - } - } - - - public static PropBuilder prop(){ - return (new PropBuilder()); - } - - -} diff --git a/vnfapi/provider/src/test/java/org/onap/sdnc/vnfapi/VnfApiProviderTestBase.java b/vnfapi/provider/src/test/java/org/onap/sdnc/vnfapi/VnfApiProviderTestBase.java new file mode 100644 index 00000000..bf33c0e7 --- /dev/null +++ b/vnfapi/provider/src/test/java/org/onap/sdnc/vnfapi/VnfApiProviderTestBase.java @@ -0,0 +1,76 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. 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 + * + * 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.onap.sdnc.vnfapi; + +import org.junit.Before; +import org.mockito.Mock; +import org.onap.sdnc.vnfapi.util.DataBrokerUtil; +import org.onap.sdnc.vnfapi.util.PropBuilder; +import org.onap.sdnc.vnfapi.util.VNFSDNSvcLogicServiceClientMockUtil; +import org.opendaylight.controller.md.sal.binding.api.DataBroker; +import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; +import org.opendaylight.controller.md.sal.binding.test.AbstractConcurrentDataBrokerTest; +import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +public class VnfApiProviderTestBase extends AbstractConcurrentDataBrokerTest { + + protected vnfapiProvider vnfapiProvider; + protected DataBroker dataBroker; + protected @Mock NotificationPublishService mockNotificationPublishService; + protected @Mock RpcProviderRegistry mockRpcProviderRegistry; + protected @Mock VNFSDNSvcLogicServiceClient mockVNFSDNSvcLogicServiceClient; + protected static final Logger LOG = LoggerFactory.getLogger(vnfapiProvider.class); + + + protected DataBrokerUtil db; + protected VNFSDNSvcLogicServiceClientMockUtil svcClient; + + + @Before + public void setUp() throws Exception { + svcClient = new VNFSDNSvcLogicServiceClientMockUtil(mockVNFSDNSvcLogicServiceClient); + dataBroker = getDataBroker(); + db = new DataBrokerUtil(dataBroker); + try { + vnfapiProvider = new vnfapiProvider( + dataBroker, + mockNotificationPublishService, + mockRpcProviderRegistry, + mockVNFSDNSvcLogicServiceClient + ); + } catch (Exception e) { + LOG.error("Caught exception on setUp", e); + throw e; + } + } + + + public static PropBuilder prop(){ + return new PropBuilder(); + } + + +} + diff --git a/vnfapi/provider/src/test/java/org/onap/sdnc/vnfapi/VnfTopologyOperationRPCTest.java b/vnfapi/provider/src/test/java/org/onap/sdnc/vnfapi/VnfTopologyOperationRPCTest.java index 422a6adb..630709cd 100644 --- a/vnfapi/provider/src/test/java/org/onap/sdnc/vnfapi/VnfTopologyOperationRPCTest.java +++ b/vnfapi/provider/src/test/java/org/onap/sdnc/vnfapi/VnfTopologyOperationRPCTest.java @@ -51,7 +51,7 @@ import static org.onap.sdnc.vnfapi.util.MDSALUtil.vnfTopologyOperationOutput; * This class test the VnfTopologyOperation mdsal RPC. */ @RunWith(MockitoJUnitRunner.class) -public class VnfTopologyOperationRPCTest extends VnfApiProviderTest { +public class VnfTopologyOperationRPCTest extends VnfApiProviderTestBase { final String SVC_OPERATION = "vnf-topology-operation"; -- cgit