コード例 #1
0
        public void ListDirectory_path_to_file_throws_DirectoryExpectedException()
        {
            var fileSystemMock = new MockCommonFileSystemListDirectory();

            fileSystemMock.SetPathExistance(_testPath, MockCommonFileSystem.PathExistance.File);

            fileSystemMock.ListDirectory(_testPath);
        }
コード例 #2
0
        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());
        }
コード例 #3
0
        public void ListDirectory_path_not_exixts_throws_FileSystemPathDoesNotExistException()
        {
            var fileSystemMock = new MockCommonFileSystemListDirectory();

            fileSystemMock.ListDirectory(_testPath);
        }