use of com.microsoft.azure.management.containerregistry.implementation.RegistryListCredentials in project azure-sdk-for-java by Azure.
the class TestContainerRegistry method createResource.
@Override
public Registry createResource(Registries registries) throws Exception {
final String newName = "registry" + this.testId;
Registry registry = registries.define(newName).withRegion(Region.US_WEST).withNewResourceGroup().withNewStorageAccount("crsa" + this.testId).withRegistryNameAsAdminUser().create();
Assert.assertTrue(registry.adminUserEnabled());
Assert.assertEquals(registry.storageAccountName(), "crsa" + this.testId);
RegistryListCredentials registryCredentials = registry.listCredentials();
Assert.assertNotNull(registryCredentials);
Assert.assertEquals(newName, registryCredentials.username());
Assert.assertEquals(2, registryCredentials.passwords().size());
return registry;
}
Aggregations