for (final CloudFileShare share : fileClient.listShares(prefix)) { assertEquals(CloudFileShare.class, share.getClass()); count++;
/** * Test that Share Quota can be set, but only to allowable values. * * @throws StorageException * @throws URISyntaxException */ @Test public void testCloudFileShareQuotaListing() throws StorageException, URISyntaxException { int shareQuota = 16; this.share.getProperties().setShareQuota(shareQuota); this.share.createIfNotExists(); Iterable<CloudFileShare> shares = this.share.getServiceClient().listShares(this.share.getName()); for (CloudFileShare fileShare : shares) { assertEquals(shareQuota, fileShare.getProperties().getShareQuota().intValue()); } }
assertEquals("value2", this.share.getMetadata().get("key2")); Iterable<CloudFileShare> shares = this.share.getServiceClient().listShares(this.share.getName(), EnumSet.of(ShareListingDetails.METADATA), null, null);
Iterable<CloudFileShare> listResult = client.listShares(share.name, EnumSet.allOf(ShareListingDetails.class), null, null);
(policy.getPermissions().contains(SharedAccessAccountPermissions.LIST))) { assertEquals(sasShare.getName(), sasClient.listShares(sasShare.getName()).iterator().next().getName()); sasClient.listShares(sasShare.getName()).iterator().next(); fail(); assertEquals(AccountSasTests.ENUMERATION_ERROR_MESSAGE, ex.getMessage()); assertEquals(sasShare.getName(), this.fileClient.listShares(sasShare.getName()).iterator().next().getName());