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

                var listaTransicao = new List <Transacao>();

                listaTransicao.Add(new Transacao {
                    MerchantCnpj = "77404852000179", AcquirerName = "Cielo", CardBrandName = "MasterCard"
                });
                listaTransicao.Add(new Transacao {
                    MerchantCnpj = "77404852000179", AcquirerName = "Cielo", CardBrandName = "MasterCard"
                });
                listaTransicao.Add(new Transacao {
                    MerchantCnpj = "77404852000179", AcquirerName = "Cielo", CardBrandName = "MasterCard"
                });


                transacaoServiceMock
                .Setup(x => x.ConsultaPorBandeira("Mastercard"))
                .ReturnsAsync(listaTransicao);

                // Act
                var result = await ControllerUnderTest.ConsultaPorBandeira("Mastercard");

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

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