public async Task DeleteAsync_DoesNotExist() { var storage = new AzureBlobStorage(Configuration); var uri = new Uri(storage.BaseUri, "a/b/file.txt"); var result = await storage.DeleteAsync(uri); result.Should().BeFalse(); }
public async Task DeleteAsync_Exists() { var storage = new AzureBlobStorage(Configuration); var uri = new Uri(storage.BaseUri, "a/b/file.txt"); await WriteBlobAsync("a/b/file.txt"); await WriteBlobAsync("a/other.txt"); (await BlobExistsAsync("a/b/file.txt")) .Should().BeTrue("blob should exist prior to deletion"); var result = await storage.DeleteAsync(uri); result.Should().BeTrue(); (await BlobExistsAsync("a/b/file.txt")) .Should().BeFalse("blob should have been deleted"); (await BlobExistsAsync("a/other.txt")) .Should().BeTrue("other blob should NOT have been deleted"); }