public async Task PostMultAsync_ValidParamsWithoutTrackingId_CalculateOperation()
        {
            //arrange
            var expectedResponse = fixture.Create <MultResponseDto>();
            var multDto          = fixture.Create <MultDto>();

            calculatorMock.Setup(m => m.Multiplication(multDto, string.Empty))
            .ReturnsAsync(expectedResponse);

            //act
            var result = await sut.Mult(string.Empty, multDto);

            //assert
            Assert.Equal(expectedResponse, result);
        }
Ejemplo n.º 2
0
        public void TestMultGet2()
        {
            //Arrange = Preparacion
            CalculatorController calc = new CalculatorController();
            int numa   = -3;
            int numb   = 4;
            int numres = -12;


            //Act = Ejecucion
            int result = calc.Mult(numa, numb);

            // Assert = Verificacion
            Assert.AreEqual(numres, result);
        }