public async Task LeaseContainerReleaseAsync_NonLeasedContainer_ThrowsLeaseIdMismatchException() { IBlobServiceClient client = new BlobServiceClient(AccountSettings); var containerName = GenerateSampleContainerName(); CreateContainer(containerName); await client.LeaseContainerReleaseAsync(containerName, FakeLeaseId); // expects exception }
public async Task LeaseContainerReleaseAsync_LeasedContainer_ReleasesLease() { IBlobServiceClient client = new BlobServiceClient(AccountSettings); var containerName = GenerateSampleContainerName(); CreateContainer(containerName); var leaseId = LeaseContainer(containerName, null, null); await client.LeaseContainerReleaseAsync(containerName, leaseId); AssertContainerIsNotLeased(containerName); }