示例#1
0
        public void Sum()
        {
            //Arrange
            int[] numbers = new int[2];
            Assert.AreEqual(0, CalculatorTest.Sum(numbers));

            numbers[0] = 7;
            Assert.AreEqual(7, CalculatorTest.Sum(numbers));

            numbers[0] = 7;
            numbers[1] = 11;
            Assert.AreEqual(18, CalculatorTest.Sum(numbers));
        }
示例#2
0
 public void Add()
 {
     Assert.AreEqual(0, CalculatorTest.Add(0, 0));
     Assert.AreEqual(4, CalculatorTest.Add(2, 2));
     Assert.AreEqual(8, CalculatorTest.Add(2, 6));
 }
示例#3
0
 public void Subtract()
 {
     Assert.AreEqual(6, CalculatorTest.Subtract(10, 4));
 }