Ejemplo n.º 1
0
        public void OddPrintSequenceOfNumbers()
        {
            OddNumbers odd      = new OddNumbers();
            int        length   = 7;
            string     expected = "1 3 5 7 9 11 13";
            string     actual   = odd.ToString(odd.GetSequence(length));

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 2
0
        public void OddShouldPrintAVariableSequenceOfNumbers()
        {
            OddNumbers odd   = new OddNumbers();
            int        input = 8;

            int[] expected = new int[] { 1, 3, 5, 7, 9, 11, 13, 15 };
            int[] actual   = odd.GetSequence(input);
            CollectionAssert.AreEqual(expected, actual);
        }