public void MemoryFileSystem_GetContents() { //arrange var rootFolderPath = "A:\\TestFolder\\Test"; var content = "This is test string"; using (var fileSystem = CreateTestMemoryFile(rootFolderPath, content)) { var adapter = new FileAdapter(fileSystem); //act var actual = adapter.GetContents(rootFolderPath); //assert Assert.IsTrue(actual.Count > 0); } }
public void FileSystem_GetContents() { //arrange var executingAssembly = Assembly.GetExecutingAssembly(); var rootFolderPath = Path.GetDirectoryName(executingAssembly.Location); var targetFolderName = "TestFolder"; var content = "This is test string"; using (var fileSystem = CreateTestFile(rootFolderPath, targetFolderName, content)) { var adapter = new FileAdapter(fileSystem); //act var actual = adapter.GetContents(targetFolderName); //assert Assert.IsTrue(actual.Count > 0); //restore fileSystem.Delete(targetFolderName, true); } }