public void TestDeleteDirectoryRelative() { // Arrange AzureBlobFileSystem provider = this.CreateAzureBlobFileSystem(); // Act provider.AddFile("media/1010/media.jpg", Stream.Null); // Assert Assert.IsTrue(provider.DirectoryExists("media/1010")); // Act provider.DeleteDirectory("\\media\\1010"); // Assert Assert.IsFalse(provider.DirectoryExists("media/1010/")); Assert.IsFalse(provider.FileExists("media/1010/media.jpg")); }
public void TestDeleteDirectoryRelative() { // Arrange AzureBlobFileSystem provider = this.CreateAzureBlobFileSystem(); // Act provider.AddFile($"{this.ContainerName}/1010/image.jpg", Stream.Null); // Assert Assert.IsTrue(provider.DirectoryExists($"{this.ContainerName}/1010")); // Act provider.DeleteDirectory($"\\{this.ContainerName}\\1010"); // Assert Assert.IsFalse(provider.DirectoryExists($"{this.ContainerName}/1010/")); Assert.IsFalse(provider.FileExists($"{this.ContainerName}/1010/image.jpg")); }
public void TestDeleteDirectory() { // Arrange AzureBlobFileSystem provider = this.CreateAzureBlobFileSystem(); // Act provider.AddFile("1010/image.jpg", Stream.Null); // Assert Assert.IsTrue(provider.DirectoryExists("1010/")); // Act provider.DeleteDirectory("1010/"); // Assert Assert.IsFalse(provider.DirectoryExists("1010/")); Assert.IsFalse(provider.FileExists("1010/image.jpg")); }
public void TestValidDirectory() { AzureBlobFileSystem provider = this.CreateAzureBlobFileSystem(); provider.AddFile("testvalid/test.txt", Stream.Null); Assert.IsTrue(provider.DirectoryExists("testvalid")); // Tidy up after test provider.DeleteDirectory("testvalid"); }
public void TestInvalidDirectory() { AzureBlobFileSystem provider = this.CreateAzureBlobFileSystem(); Assert.IsFalse(provider.DirectoryExists("testinvalid/")); }