public void ListDirectory_path_to_file_throws_DirectoryExpectedException() { var fileSystemMock = new MockCommonFileSystemListDirectory(); fileSystemMock.SetPathExistance(_testPath, MockCommonFileSystem.PathExistance.File); fileSystemMock.ListDirectory(_testPath); }
public void ListDirectory_path_to_directory_lists_it() { var fileSystemMock = new MockCommonFileSystemListDirectory(); fileSystemMock.PathToReturn = _anotherTestPath; fileSystemMock.SetPathExistance(_testPath, MockCommonFileSystem.PathExistance.Directory); var result = fileSystemMock.ListDirectory(_testPath); Assert.That(fileSystemMock.Called); AssertPath(fileSystemMock.Path); Assert.AreEqual(new FileSystemPath[] { _anotherTestPath }, result.ToArray()); }
public void ListDirectory_path_not_exixts_throws_FileSystemPathDoesNotExistException() { var fileSystemMock = new MockCommonFileSystemListDirectory(); fileSystemMock.ListDirectory(_testPath); }