Exemple #1
0
        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));
        }
Exemple #2
0
        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));
            }
        }