Add() public method

public Add ( ) : void
return void
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }