Beispiel #1
0
        public void TestAddAndClear()
        {
            calcMethods.Add(20, 30);
            int actual   = calcMethods.Result;
            int expected = 50;

            Assert.AreEqual(actual, expected);
            calcMethods.AllClear();
            actual = calcMethods.Result;
            Assert.AreEqual(actual, 0);
        }
Beispiel #2
0
        public void AddTest(int a, int b, int c)
        {
            CalcMethods cal = new CalcMethods();

            Assert.That(cal.Add(a, b), Is.EqualTo(c));
        }
Beispiel #3
0
 public void AddTest(int number1, int number2, int expected)
 {
     Assert.AreEqual(expected, cl.Add(number1, number2));
 }
Beispiel #4
0
        public void testAdd(int a, int b, int expected)
        {
            int actual = calcMethods.Add(a, b);

            Assert.That(actual, Is.EqualTo(expected));
        }