@Test(dependsOnMethods = "testIsAvailable") public void testCreate() { URI uri = api().create(NAME, LOCATION, ImmutableMap.of("property_name", "property_value"), ImmutableMap.of("accountType", StorageService.AccountType.Standard_LRS.toString())); if (uri != null){ assertTrue(uri.toString().contains("api-version")); boolean jobDone = Predicates2.retry(new Predicate<URI>() { @Override public boolean apply(URI uri) { return ParseJobStatus.JobStatus.DONE == api.getJobApi().jobStatus(uri); } }, 60 * 1 * 1000 /* 1 minute timeout */).apply(uri); assertTrue(jobDone, "create operation did not complete in the configured timeout"); } final StorageService service = api().get(NAME); assertNotNull(service); assertEquals(service.location(), LOCATION); assertNotNull(service.storageServiceProperties().creationTime()); }
private void check(final StorageService storage) { assertNotNull(storage.id()); assertNotNull(storage.name()); assertNotNull(storage.storageServiceProperties()); assertNotNull(storage.storageServiceProperties().accountType()); assertFalse(storage.storageServiceProperties().primaryEndpoints().isEmpty()); assertNotNull(storage.storageServiceProperties().creationTime()); }