Exemplo n.º 1
0
        public static void Main()
        {
            Console.WriteLine("Let's start with a number");
            int             input     = int.Parse(Console.ReadLine());
            NumberProcessor processor = new NumberProcessor();

            processor.SetInput(input);

            for (int i = 1; i <= input; ++i)
            {
                Console.WriteLine(processor.DoTheThing(i));
            }
        }
Exemplo n.º 2
0
        public void Number_IsDivisibleByFiveAndThree_PingPong()
        {
            NumberProcessor testProcessor = new NumberProcessor();

            Assert.AreEqual("PingPong", testProcessor.DoTheThing(60));
        }
Exemplo n.º 3
0
        public void Number_IsDivisibleByThreeButNotFive_Ping()
        {
            NumberProcessor testProcessor = new NumberProcessor();

            Assert.AreEqual("Ping", testProcessor.DoTheThing(21));
        }
Exemplo n.º 4
0
        public void Number_IsNotDivisibleByFiveOrThree_Number()
        {
            NumberProcessor testProcessor = new NumberProcessor();

            Assert.AreEqual("4", testProcessor.DoTheThing(4));
        }
Exemplo n.º 5
0
        public void Number_IsDivisibleByFiveButNotThree_Pong()
        {
            NumberProcessor testProcessor = new NumberProcessor();

            Assert.AreEqual("Pong", testProcessor.DoTheThing(55));
        }