public void Should_ReturnContentsFromBook_WhenAccessedFromFile(string fileName, string text) { var parser = new Parser.Parser(); Assert.That(parser.Read(fileName), Is.Not.Null); Assert.That(parser.Read(fileName), Is.EqualTo(text)); }
public static void Main() { var parser = new Parser.Parser(); var primeChecker = new Parser.PrimeChecker(); var countedWords = parser.CountWords(parser.Read("TheRailwayChildren.txt")); foreach (var word in countedWords) { Console.WriteLine(word.Key + " : " + word.Value + " : " + primeChecker.IsPrime(word.Value)); } }