public async Task GivenANotExistingDirectoryName_WhenMoveDirectory_ExceptionShouldBeThrown()
        {
            var uniqueContainerName             = Guid.NewGuid().ToString("N");
            AzureBlobContainerClient adlsClient = GetTestAdlsGen2Client(uniqueContainerName);

            Skip.If(adlsClient == null);

            var blobContainerClient = GetBlobContainerClient(uniqueContainerName);

            blobContainerClient.CreateIfNotExists();

            try
            {
                await Assert.ThrowsAsync <AzureBlobOperationFailedException>(() => adlsClient.MoveDirectoryAsync("foldernotexist", "dest"));
            }
            finally
            {
                await blobContainerClient.DeleteAsync();
            }
        }
        public async Task GivenADirectoryName_WhenMoveDirectories_AllSubDirectoriesShouldBeMoved()
        {
            var uniqueContainerName             = Guid.NewGuid().ToString("N");
            AzureBlobContainerClient adlsClient = GetTestAdlsGen2Client(uniqueContainerName);

            Skip.If(adlsClient == null);

            var blobContainerClient = GetBlobContainerClient(uniqueContainerName);

            blobContainerClient.CreateIfNotExists();

            try
            {
                // Set up directory info
                var blobList = new List <string> {
                    "foo/bar/1.txt", "foo/bar1/1.txt", "foo/bar2/2.txt", "foo/bar2/2.1.txt", "foo/bar3/3.txt"
                };
                var expectedBlobs = new List <string> {
                    "boo/bar/1.txt", "boo/bar1/1.txt", "boo/bar2/2.txt", "boo/bar2/2.1.txt", "boo/bar3/3.txt"
                };
                foreach (var blob in blobList)
                {
                    await blobContainerClient.UploadBlobAsync(blob, new MemoryStream(new byte[] { 1, 2, 3 }));
                }

                await adlsClient.MoveDirectoryAsync("foo", "boo");

                foreach (var expectedBlob in expectedBlobs)
                {
                    var blob = blobContainerClient.GetBlobClient(expectedBlob);
                    Assert.True(blob.Exists());
                }
            }
            finally
            {
                await blobContainerClient.DeleteAsync();
            }
        }