private async Task InitializeFileSystem() { IDataLakeFileSystem management = new DataLakeFileSystem(_testOption, _loggerFactory.CreateLogger <DataLakeFileSystem>()); await management.CreateIfNotExist(_testOption.ContainerName, CancellationToken.None); IDataLakeStore dataLakeStore = new DataLakeStore(_testOption, _loggerFactory.CreateLogger <DataLakeStore>()); await ClearContainer(dataLakeStore); }
public async Task GivenFileSystem_WhenNotExist_CreateShouldExist() { var option = _testOption with { ContainerName = _testOption.ContainerName + 3 }; IDataLakeFileSystem management = new DataLakeFileSystem(option, _loggerFactory.CreateLogger <DataLakeFileSystem>()); await management.DeleteIfExist(option.ContainerName, CancellationToken.None); await management.CreateIfNotExist(option.ContainerName, CancellationToken.None); IReadOnlyList <string> list = await management.List(CancellationToken.None); list.Count(x => x == option.ContainerName).Should().Be(1); await management.Delete(option.ContainerName, CancellationToken.None); } }