use of com.sequenceiq.environment.network.v1.converter.AzureEnvironmentNetworkConverter in project cloudbreak by hortonworks.
the class EnvironmentNetworkServiceTest method testCreateProviderSpecificNetworkResources.
@Test
void testCreateProviderSpecificNetworkResources() {
EnvironmentDto environmentDto = EnvironmentDto.builder().withCloudPlatform(CLOUD_PLATFORM).withCreator(USER_CRN).build();
NetworkResourcesCreationRequest networkResourcesCreationRequest = new NetworkResourcesCreationRequest.Builder().build();
AzureEnvironmentNetworkConverter networkConverter = mock(AzureEnvironmentNetworkConverter.class);
BaseNetwork baseNetwork = getNetwork();
when(cloudConnector.networkConnector()).thenReturn(networkConnector);
when(networkCreationRequestFactory.createProviderSpecificNetworkResources(environmentDto, baseNetwork)).thenReturn(networkResourcesCreationRequest);
when(environmentNetworkConverterMap.get(CloudPlatform.valueOf(CLOUD_PLATFORM))).thenReturn(networkConverter);
underTest.createProviderSpecificNetworkResources(environmentDto, baseNetwork);
verify(cloudConnector).networkConnector();
verify(cloudPlatformConnectors).get(any(CloudPlatformVariant.class));
verify(networkCreationRequestFactory).createProviderSpecificNetworkResources(environmentDto, baseNetwork);
verify(networkConnector).createProviderSpecificNetworkResources(networkResourcesCreationRequest);
}
Aggregations