Beispiel #1
0
        public void AddTest(int number1, int number2, int expected)
        {
            CalculatorBL calculator = new CalculatorBL();
            var          result     = calculator.Add(number1, number2);

            Assert.Equal(expected, result);
        }
Beispiel #2
0
        public AddResult Add([FromBody] AddRequest addRequest)
        {
            var    headers     = this.Request.Headers.ToList();
            string tracking_ID = headers[headers.Count - 1].Value.First().ToString();

            return(CalculatorBL.Add(addRequest, tracking_ID));
        }
Beispiel #3
0
        public void AddTest()
        {
            var number1  = 10;
            var number2  = 20;
            var expected = 30;

            CalculatorBL calculator = new CalculatorBL();
            var          result     = calculator.Add(number1, number2);

            Assert.Equal(expected, result);
        }
Beispiel #4
0
        public void FailingAddTest()
        {
            CalculatorBL calculator = new CalculatorBL();

            Assert.Equal(5, calculator.Add(2, 2));
        }