Beispiel #1
0
        public void EmprestimoIntegracaoSistema_ObterTudo_DeveSerValido()
        {
            //Cenário
            IEnumerable <Emprestimo> listaEmprestimo;

            //Ação
            listaEmprestimo = _emprestimoService.ObtemTudo();

            //Verificar
            listaEmprestimo.Should().NotBeNull();
            listaEmprestimo.Count().Should().BeGreaterOrEqualTo(0);
        }
Beispiel #2
0
        public void EmprestimoService_ObtemTudo_DeveSerValido()
        {
            //Cenário
            _mockEmprestimoRepositorio.Setup(rp => rp.ObterTudo()).Returns(Enumerable.Empty <Emprestimo>);

            //Ação
            IEnumerable <Emprestimo> retorno = _emprestimoService.ObtemTudo();

            //Verificar
            foreach (Emprestimo emprestimo in retorno)
            {
                emprestimo.Id.Should().BeGreaterThan(0);
                emprestimo.Should().NotBeNull();
            }

            _mockEmprestimoRepositorio.Verify(rp => rp.ObterTudo());
        }