public void ReadBinaryFile_path_to_directory_throws_FileExpectedException() { var fileSystemMock = new MockCommonFileSystemReadFile(); fileSystemMock.SetPathExistance(_testPath, MockCommonFileSystem.PathExistance.Directory); fileSystemMock.ReadBinaryFile(_testPath); }
public void ReadBinaryFile_path_to_file_returns_contents() { var data = new byte[] { 1, 2, 3, 4, 5, 6 }; var fileSystemMock = new MockCommonFileSystemReadFile(); fileSystemMock.SetPathExistance(_testPath, MockCommonFileSystem.PathExistance.File); fileSystemMock.DataToReturn = data; var result = fileSystemMock.ReadBinaryFile(_testPath); Assert.That(fileSystemMock.Called); AssertPath(fileSystemMock.Path); Assert.AreEqual(data, result); }
public void ReadBinaryFile_path_not_exixts_throws_FileSystemPathDoesNotExistException() { var fileSystemMock = new MockCommonFileSystemReadFile(); fileSystemMock.ReadBinaryFile(_testPath); }