public async Task DesktopStorageTryToDeleteContainer() { // Arrange IStorage storage = new FileSystemStorage(this._storagePath); const string containerName = "DesktopStorageTryToDeleteContainer"; await storage.CreateOrGetContainerAsync(containerName, ContainerPermission.Public, failIfExists : false); var storages1 = await storage.GetContainersListAsync(containerName); // Act await storage.DeleteContainerAsync(containerName); var storages2 = await storage.GetContainersListAsync(containerName); // Assert Assert.NotNull(storages1); Assert.NotNull(storages2); Assert.True(storages1.All(c => string.Equals(c, containerName))); Assert.False(storages2.Any()); }
public async Task DesktopStorageTryToDeleteContainer() { // Arrange IStorage storage = new FileSystemStorage(this._storagePath); const string containerName = "DesktopStorageTryToDeleteContainer"; await storage.CreateOrGetContainerAsync(containerName, ContainerPermission.Public, failIfExists: false); var storages1 = await storage.GetContainersListAsync(containerName); // Act await storage.DeleteContainerAsync(containerName); var storages2 = await storage.GetContainersListAsync(containerName); // Assert Assert.NotNull(storages1); Assert.NotNull(storages2); Assert.True(storages1.All(c => string.Equals(c, containerName))); Assert.False(storages2.Any()); }