Example #1
0
        public void CheckSum()
        {
            SumRequest sum = new SumRequest()
            {
                a = 3, b = 4
            };

            IOperation sumOperation = new SumOperation(_logger, _repositoryMock.Object);

            _repositoryMock.Setup(x => x.Sum(sum.a, sum.b)).Returns(7);

            var result = (SumResponse)sumOperation.Execute(sum);

            Assert.AreEqual(7, result.Result);
        }
 public void ExecuteSuccess()
 {
     Assert.AreEqual(-4, _operation.Execute(1, -5));
     Assert.AreEqual(8, _operation.Execute(3, 5));
     Assert.AreNotEqual(1, _operation.Execute(1, 5));
 }