From 107951a4b13c1a4c725b9df201a1af7595ef4dec Mon Sep 17 00:00:00 2001 From: Joey Sullivan Date: Thu, 19 Oct 2017 19:53:05 +0000 Subject: Create a Junit test for ServiceTopologyOperation This test verifies ServiceTopologyOperation RPC executes a DG then produces the expected ServiceTopologyOperationOutput and persisted the expected Service in the DataBroker. In addition util classes were written to make it easier to write additional MDSAL test in the future. Change-Id: I2281099df767397b628ec2caff06f3dd49962b8b Issue-ID: SDNC-101 Signed-off-by: Joey Sullivan --- .../sdnc/northbound/GenericResourceApiProvider.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'generic-resource-api/provider/src/main') diff --git a/generic-resource-api/provider/src/main/java/org/onap/sdnc/northbound/GenericResourceApiProvider.java b/generic-resource-api/provider/src/main/java/org/onap/sdnc/northbound/GenericResourceApiProvider.java index 7d8f4b3a..a747df6f 100644 --- a/generic-resource-api/provider/src/main/java/org/onap/sdnc/northbound/GenericResourceApiProvider.java +++ b/generic-resource-api/provider/src/main/java/org/onap/sdnc/northbound/GenericResourceApiProvider.java @@ -146,15 +146,19 @@ public class GenericResourceApiProvider implements AutoCloseable, GENERICRESOURC protected RpcProviderRegistry rpcRegistry; protected BindingAwareBroker.RpcRegistration rpcRegistration; - private GenericResourceApiSvcLogicServiceClient svcLogicClient; - - public GenericResourceApiProvider(DataBroker dataBroker2, NotificationPublishService notificationPublishService, - RpcProviderRegistry rpcProviderRegistry, GenericResourceApiSvcLogicServiceClient client) { + private final GenericResourceApiSvcLogicServiceClient svcLogicClient; + + public GenericResourceApiProvider( + DataBroker dataBroker, + NotificationPublishService notificationPublishService, + RpcProviderRegistry rpcProviderRegistry, + GenericResourceApiSvcLogicServiceClient client + ) { log.info("Creating provider for {}", appName); executor = Executors.newFixedThreadPool(1); - dataBroker = dataBroker2; - notificationService = notificationPublishService; - rpcRegistry = rpcProviderRegistry; + setDataBroker(dataBroker); + setNotificationService(notificationPublishService); + setRpcRegistry(rpcProviderRegistry); svcLogicClient = client; initialize(); -- cgit 1.2.3-korg