예제 #1
0
 public void AddIntTest()
 {
     Assert.AreEqual(12, calculate.Add(a, b));
 }
예제 #2
0
        public void TestAdd(int a0, int a1, int expected)
        {
            int result = Calculator.Add(a0, a1);

            Assert.Equal(expected, result);
        }
예제 #3
0
 public void AddIntTest()
 {
     Assert.AreEqual(9, calc.Add(a, b));
 }
예제 #4
0
        public void Add_Throws_Negative_Numbers(string input)
        {
            var calculator = new Calculator();

            Assert.Throws <ArgumentException>(() => calculator.Add(input));
        }
예제 #5
0
        public void Add2Numbers()
        {
            int result = Calculator.Add(10, 5);

            Assert.AreEqual(15, result);
        }
예제 #6
0
 public void NoNegatives()
 {
     Assert.ThrowsException <ArgumentException>(() => Calculator.Add(-1, 10));
     Assert.ThrowsException <ArgumentException>(() => Calculator.Add(10, -1));
 }