use of org.ovirt.engine.api.model.ExternalNetworkProviderConfigurations in project ovirt-engine by oVirt.
the class BackendExternalProviderHelperTest method completeExternalNetworkProviderConfigurationsNoNameTest.
@Test
public void completeExternalNetworkProviderConfigurationsNoNameTest() {
ExternalNetworkProviderConfigurations configurations = getExternalNetworkProviderConfigurations(1);
configurations.getExternalNetworkProviderConfigurations().get(0).getExternalNetworkProvider().setName(null);
try {
BackendExternalProviderHelper.completeExternalNetworkProviderConfigurations(resource, configurations);
fail("expected WebApplicationException");
} catch (WebApplicationException wae) {
verifyFault(wae, Response.Status.BAD_REQUEST.getStatusCode());
}
}
use of org.ovirt.engine.api.model.ExternalNetworkProviderConfigurations in project ovirt-engine by oVirt.
the class BackendExternalProviderHelperTest method completeExternalNetworkProviderConfigurationsTest.
@Test
public void completeExternalNetworkProviderConfigurationsTest() {
setUpQueryExpectations();
ExternalNetworkProviderConfigurations configurations = getExternalNetworkProviderConfigurations(PROVIDER_COUNT);
BackendExternalProviderHelper.completeExternalNetworkProviderConfigurations(resource, configurations);
List<ExternalNetworkProviderConfiguration> configurationList = configurations.getExternalNetworkProviderConfigurations();
for (int i = 0; i < PROVIDER_COUNT; i++) {
verifyModel(configurationList.get(i).getExternalNetworkProvider(), i);
}
}
Aggregations