public void GetContainerACL_NonexistentQueue_ThrowsQueueNotFoundException()
        {
            IBlobServiceClient client = new BlobServiceClient(AccountSettings);
            var containerName = GenerateSampleContainerName();

            client.GetContainerACL(containerName);

            // expects exception
        }
        public void GetContainerACL_HasAccessPolicies_ReturnsListConstainingThosePolicies()
        {
            IBlobServiceClient client = new BlobServiceClient(AccountSettings);
            var containerName = GenerateSampleContainerName();
            CreateContainer(containerName);
            string expectedId = "abc-123";
            DateTime expectedStart = GetTruncatedUtcNow();
            AddContainerAccessPolicy(containerName, Microsoft.WindowsAzure.Storage.Blob.BlobContainerPublicAccessType.Off, expectedId, expectedStart, expectedStart.AddDays(1));

            var result = client.GetContainerACL(containerName);

            Assert.IsNotEmpty(result.SignedIdentifiers);
            Assert.AreEqual("abc-123", result.SignedIdentifiers.First().Id);
            Assert.AreEqual(expectedStart, result.SignedIdentifiers.First().AccessPolicy.StartTime);
            Assert.AreEqual(expectedStart.AddDays(1), result.SignedIdentifiers.First().AccessPolicy.Expiry);
        }
        public void GetContainerACL_NoPublicAccess_ReturnsPublicAccessAsNone()
        {
            IBlobServiceClient client = new BlobServiceClient(AccountSettings);
            var containerName = GenerateSampleContainerName();
            CreateContainer(containerName);
            AddContainerAccessPolicy(containerName, Microsoft.WindowsAzure.Storage.Blob.BlobContainerPublicAccessType.Off);

            var result = client.GetContainerACL(containerName);

            Assert.AreEqual(ContainerAccessType.None, result.PublicAccess);
        }
        public void GetContainerACL_NoAccessPolicies_ReturnsEmptyList()
        {
            IBlobServiceClient client = new BlobServiceClient(AccountSettings);
            var containerName = GenerateSampleContainerName();
            CreateContainer(containerName);

            var result = client.GetContainerACL(containerName);

            Assert.IsEmpty(result.SignedIdentifiers);
        }