Add() 공개 메소드

public Add ( ) : void
리턴 void
예제 #1
0
        public void 傳入1跟2然後回傳3()
        {
            //arrange
            var target = new MyCalculator();
            var first = 1;
            var second = 2;

            var expected = 3;
            //act
            var actual = target.Add(first, second);
            //assert

            Assert.AreEqual(expected, actual);
        }
예제 #2
0
        public void AddTest_first_1_second_2_should_be_3()
        {
            //arrange
            var target = new MyCalculator();
            var first = 1;
            var second = 2;
            var expected = 3;

            //act
            var actual = target.Add(first, second);

            //assert
            Assert.AreEqual(expected, actual);
        }