Exemple #1
0
            public async Task Deve_Consultar_Por_Cnpj_DataAtual_e_Mastercard()
            {
                // Arrange

                var listaTransicao = new List <Transacao>();

                listaTransicao.Add(new Transacao
                {
                    MerchantCnpj = "77404852000179",
                    AcquirerAuthorizationDateTime = DateTime.Now,
                    CardBrandName = Const.Mastercard
                });

                transacaoServiceMock
                .Setup(x => x.ConsultaPorCnpjDataAtualMastercard("77404852000179"))
                .ReturnsAsync(listaTransicao);

                // Act
                var result = await ControllerUnderTest.ConsultaPorCnpjDataAtualMastercard("77404852000179");

                // Assert
                var okResult = Assert.IsType <OkObjectResult>(result);

                Assert.Same(listaTransicao, okResult.Value);
            }