public void TestReaderReturnsContentFromValidFile()
        {
            var expectedContent = new[] { "I am test data.", "So am I.", "I am not. hehehe." };
            var path            = @"../../IO/Data/TestTextFile.txt";
            var result          = (string[])reader.ReadDataFromFile(path);

            Assert.AreEqual(expectedContent.Count(), result.Count());
            Assert.AreEqual(expectedContent[0], result[0]);
            Assert.AreEqual(expectedContent[1], result[1]);
            Assert.AreEqual(expectedContent[2], result[2]);
        }
Beispiel #2
0
 private IEnumerable <string> RetrieveDataFromFile(string path)
 {
     return(_fileReader.ReadDataFromFile(path));
 }