public void ReadAllText_FromExistentUnicodeResourceWithAsciiEncoding_ShouldNotReturnCorrectContent() { DefaultFileSystemReaderImplementation readerSut = new DefaultFileSystemReaderImplementation(); string returnValue = readerSut.ReadAllText("TestData/FileSystemDataUnicode.txt", Encoding.ASCII); Assert.AreNotEqual("This is a test content.\nWith two lines and unicode char: ۩.", returnValue); }
public void ReadAllText_FromExistentResource_ShouldReturnCorrectContent() { DefaultFileSystemReaderImplementation readerSut = new DefaultFileSystemReaderImplementation(); string returnValue = readerSut.ReadAllText("TestData/FileSystemData.txt"); Assert.AreEqual("This is a test content.\nWith two lines.", returnValue); }
public void ReadAllText_WithEncodingAndWithNotExistentFilePath_ShouldThrowFileNotFoundException() { DefaultFileSystemReaderImplementation readerSut = new DefaultFileSystemReaderImplementation(); readerSut.ReadAllText("a/b/c/NotExistent/NotExistentTestFile.fab", Encoding.UTF8); }