Beispiel #1
0
        public void WriteTextFile_write_over_existing_file_works()
        {
            var fileSystemMock = new MockCommonFileSystemWriteFile();

            fileSystemMock.SetPathExistance(_testPath, MockCommonFileSystem.PathExistance.File);
            TestWriteTextFile(fileSystemMock, null);
        }
Beispiel #2
0
        public void WriteTextFile_path_to_directory_throws_FileExpectedException()
        {
            var fileSystemMock = new MockCommonFileSystemWriteFile();

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

            fileSystemMock.WriteTextFile(_testPath, "Moo", null, false);
        }
Beispiel #3
0
        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 });
        }