public void WriteBinaryFile_path_to_directory_throws_FileExpectedException() { var fileSystemMock = new MockCommonFileSystemWriteFile(); fileSystemMock.SetPathExistance(_testPath, MockCommonFileSystem.PathExistance.Directory); fileSystemMock.WriteBinaryFile(_testPath, new byte[] { 1, 2, 3 }); }
private void TestWriteBinaryFile(MockCommonFileSystemWriteFile fileSystemMock) { var data = new byte[] { 1, 2, 3, 4, 5, 6 }; fileSystemMock.WriteBinaryFile(_testPath, data, false); Assert.That(fileSystemMock.Called); AssertPath(fileSystemMock.Path); Assert.AreEqual(data, fileSystemMock.Data); }