Exemple #1
0
 public static void BasicTests()
 {
     Assert.AreEqual(1, GrasshopperSummation.summation(1));
     Assert.AreEqual(36, GrasshopperSummation.summation(8));
     Assert.AreEqual(253, GrasshopperSummation.summation(22));
     Assert.AreEqual(5050, GrasshopperSummation.summation(100));
     Assert.AreEqual(22791, GrasshopperSummation.summation(213));
 }
        public void GrasshopperSummation_Method(int num, int expected)
        {
            //  Arrange
            GrasshopperSummation grasshopperSummation = new GrasshopperSummation();

            //  Act
            int actual = GrasshopperSummation.SummationTests(num);

            //  Assert
            Assert.Equal(actual, expected);
        }