summaryrefslogtreecommitdiffstats
path: root/adapters/mso-network-adapter/src/test/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-network-adapter/src/test/java/org')
-rw-r--r--adapters/mso-network-adapter/src/test/java/org/openecomp/mso/adapters/network/NetworkAdapterTest.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/adapters/mso-network-adapter/src/test/java/org/openecomp/mso/adapters/network/NetworkAdapterTest.java b/adapters/mso-network-adapter/src/test/java/org/openecomp/mso/adapters/network/NetworkAdapterTest.java
index 1106c5543d..417ea80e59 100644
--- a/adapters/mso-network-adapter/src/test/java/org/openecomp/mso/adapters/network/NetworkAdapterTest.java
+++ b/adapters/mso-network-adapter/src/test/java/org/openecomp/mso/adapters/network/NetworkAdapterTest.java
@@ -34,6 +34,8 @@ import org.junit.Test;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.openecomp.mso.adapters.network.exceptions.NetworkException;
+import org.openecomp.mso.cloud.CloudConfig;
+import org.openecomp.mso.cloud.CloudConfigFactory;
import org.openecomp.mso.db.catalog.CatalogDatabase;
import org.openecomp.mso.db.catalog.beans.NetworkResource;
import org.openecomp.mso.db.catalog.beans.NetworkResourceCustomization;
@@ -50,11 +52,15 @@ public class NetworkAdapterTest {
@Mock
private static CatalogDatabase db;
+
+ @Mock
+ private static CloudConfigFactory cloudConfigFactory;
@BeforeClass
public static final void prepare () {
adapter = Mockito.spy (new MsoNetworkAdapterImpl ());
db = Mockito.mock (CatalogDatabase.class);
+ cloudConfigFactory = Mockito.mock(CloudConfigFactory.class);
NetworkResource networkResource = new NetworkResource ();
NetworkResourceCustomization nrc = new NetworkResourceCustomization();
nrc.setNetworkResource(networkResource);
@@ -65,6 +71,9 @@ public class NetworkAdapterTest {
networkResource.setOrchestrationMode ("toto");
Mockito.when (db.getNetworkResource ("PROVIDER")).thenReturn (networkResource);
Mockito.when (adapter.getCatalogDB ()).thenReturn (db);
+ CloudConfig cloudConfig = Mockito.mock(CloudConfig.class);
+ Mockito.when(cloudConfigFactory.getCloudConfig()).thenReturn(cloudConfig);
+ Mockito.when (adapter.getCloudConfigFactory()).thenReturn(cloudConfigFactory);
}
@Test