Esempio n. 1
0
 public void TestConstantM()
 {
     int[] expectedValues = { 1, 2, 3, 4, 13 };
     for (int i = 0; i < 20; i++)
     {
         var actualResult = Exercise04.Run(0, i);
         Assert.AreEqual(i + 1, actualResult);
     }
 }
Esempio n. 2
0
 public void TestZeroN()
 {
     int[] expectedValues = { 1, 2, 3, 5, 13 };
     for (int i = 0; i < 5; i++)
     {
         var actualResult = Exercise04.Run(i, 0);
         Assert.AreEqual(expectedValues[i], actualResult);
     }
 }
Esempio n. 3
0
 public void TestEqualValues()
 {
     int[] expectedValues = { 3, 7, 61, 5, 13, 65533 };
     for (int i = 1; i < 4; i++)
     {
         var actualResult = Exercise04.Run(i, i);
         Assert.AreEqual(expectedValues[i - 1], actualResult);
     }
 }
Esempio n. 4
0
        public void TestConstantM()
        {
            var expectedValues = new[] { 1, 2, 3, 4, 13 };

            for (var i = 0; i < 20; i++)
            {
                var actualResult = Exercise04.Run(0, i);
                actualResult.Should().Be(expectedValues[i]);
            }
        }
Esempio n. 5
0
        public void TestZeroN()
        {
            var expectedValues = new[] { 1, 2, 3, 5, 13 };

            for (var i = 0; i < 5; i++)
            {
                var actualResult = Exercise04.Run(i, 0);
                actualResult.Should().Be(expectedValues[i]);
            }
        }
Esempio n. 6
0
        public void TestEqualValues()
        {
            var expectedValues = new[] { 3, 7, 61, 5, 13, 65533 };

            for (var i = 1; i < 4; i++)
            {
                var actualResult = Exercise04.Run(i, i);
                actualResult.Should().Be(expectedValues[i]);
            }
        }
Esempio n. 7
0
        public void TestMatrix()
        {
            var expectedValues = new[, ]
            {
                { 1, 2, 3, 4, 5, 6 },
                { 2, 3, 4, 5, 6, 7 },
                { 3, 5, 7, 9, 11, 13 },
                { 5, 13, 29, 61, 125, 253 }
            };

            for (var i = 0; i < expectedValues.GetLength(0); i++)
            {
                for (var j = 0; j < expectedValues.GetLength(1); j++)
                {
                    var actualResult = Exercise04.Run(i, j);
                    actualResult.Should().Be(expectedValues[i, j]);
                }
            }
        }
Esempio n. 8
0
 public void TestMatrix()
 {
     int[,] expectedValues =
     {
         { 1,  2,  3,  4,   5,   6 },
         { 2,  3,  4,  5,   6,   7 },
         { 3,  5,  7,  9,  11,  13 },
         { 5, 13, 29, 61, 125, 253 }
     };
     for (int i = 0; i < expectedValues.GetLength(0); i++)
     {
         for (int j = 0; j < expectedValues.GetLength(1); j++)
         {
             var actualResult = Exercise04.Run(i, j);
             Assert.AreEqual(expectedValues[i, j], actualResult);
         }
     }
     {
     }
 }
Esempio n. 9
0
        public void TestZeroValues()
        {
            var actualResult = Exercise04.Run(0, 0);

            actualResult.Should().Be(1);
        }
Esempio n. 10
0
        public void TestZeroValues()
        {
            var actualResult = Exercise04.Run(0, 0);

            Assert.AreEqual(1, actualResult);
        }