use of org.ovirt.engine.api.model.ExternalProviders in project ovirt-engine by oVirt.
the class BackendExternalProviderHelperTest method completeExternalProvidersTest.
@Test
public void completeExternalProvidersTest() {
setUpQueryExpectations();
ExternalProviders providers = getExternalProviders(PROVIDER_COUNT);
BackendExternalProviderHelper.completeExternalProviders(resource, providers);
List<ExternalProvider> providerList = providers.getExternalProviders();
for (int i = 0; i < PROVIDER_COUNT; i++) {
verifyModel(providerList.get(i), i);
}
}
use of org.ovirt.engine.api.model.ExternalProviders in project ovirt-engine by oVirt.
the class BackendExternalProviderHelperTest method completeExternalProvidersNoNameTest.
@Test
public void completeExternalProvidersNoNameTest() {
ExternalProviders providers = getExternalProviders(1);
providers.getExternalProviders().get(0).setName(null);
try {
BackendExternalProviderHelper.completeExternalProviders(resource, providers);
fail("expected WebApplicationException");
} catch (WebApplicationException wae) {
verifyFault(wae, Response.Status.BAD_REQUEST.getStatusCode());
}
}
Aggregations