コード例 #1
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));
            }
        }
コード例 #2
0
        public void Should_IdentifyIfNumberIsPrime(int number, bool result)
        {
            var primeChecker = new Parser.PrimeChecker();

            Assert.That(primeChecker.IsPrime(number), Is.EqualTo(result));
        }