Esempio n. 1
0
        public void TestEvenZero()
        {
            int input  = 0;
            var result = new AllEvenNumbers().CreateSequence(input);

            Assert.IsTrue(SequenceTestHelper.TestLinearSquence(result, input, 0, 2));
        }
        public void TestAllMaxInt()
        {
            int input  = int.MaxValue / 2;
            var result = new AllNumbers().CreateSequence(input);

            Assert.IsTrue(SequenceTestHelper.TestLinearSquence(result, input, 0, 1));
        }
        public void TestAllNegative()
        {
            int input  = -15;
            var result = new AllNumbers().CreateSequence(input);

            Assert.IsTrue(SequenceTestHelper.TestLinearSquence(result, input, 0, 1));
        }
Esempio n. 4
0
        public void TestEvenGeneral()
        {
            int input  = 15;
            var result = new AllEvenNumbers().CreateSequence(input);

            Assert.IsTrue(SequenceTestHelper.TestLinearSquence(result, input, 0, 2));

            input *= 2;
            var result2 = new AllEvenNumbers().CreateSequence(input);

            Assert.IsTrue(SequenceTestHelper.TestLinearSquence(result2, input, 0, 2));

            input *= 3;
            var result3 = new AllEvenNumbers().CreateSequence(input);

            Assert.IsTrue(SequenceTestHelper.TestLinearSquence(result3, input, 0, 2));
        }