public async Task LeaseContainerRenewAsync_NonLeasedContainer_ThrowsLeaseIdMismatchException() { IBlobServiceClient client = new BlobServiceClient(AccountSettings); var containerName = GenerateSampleContainerName(); CreateContainer(containerName); await client.LeaseContainerRenewAsync(containerName, FakeLeaseId); // expects exception }
public async Task LeaseContainerRenewAsync_LeasedContainer_RenewsActiveLease() { IBlobServiceClient client = new BlobServiceClient(AccountSettings); var containerName = GenerateSampleContainerName(); CreateContainer(containerName); var leaseId = LeaseContainer(containerName, TimeSpan.FromSeconds(30), null); await client.LeaseContainerRenewAsync(containerName, leaseId); // how do I test this? // it didn't blow up and it's still leased? AssertContainerIsLeased(containerName, leaseId); }