Beispiel #1
0
        public void TestGetListOfDivisors1()
        {
            var expected = new List <int>
            {
                1
            };
            var output = Divisors.GetListOfDivisors(1);

            CollectionAssert.AreEqual(expected, output);
        }
Beispiel #2
0
        public void TestGetListOfDivisors5040()
        {
            var expected = new List <int>
            {
                1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20,
                21, 24, 28, 30, 35, 36, 40, 42, 45, 48, 56, 60, 63, 70,
                72, 80, 84, 90, 105, 112, 120, 126, 140, 144, 168, 180,
                210, 240, 252, 280, 315, 336, 360, 420, 504, 560, 630,
                720, 840, 1008, 1260, 1680, 2520, 5040
            };
            var output = Divisors.GetListOfDivisors(5040);

            CollectionAssert.AreEqual(expected, output);
        }