Пример #1
0
        public void Service_Livro_Deveria_BuscarTodos()
        {
            List <Livro> livros = ObjectMother.GetLivros();

            _repository
            .Setup(l => l.GetAll()).Returns(livros);
            List <Livro> recebidos = _service.PegarTodos();

            _repository.Verify(x => x.GetAll());
            recebidos.Should().BeEquivalentTo(livros);
        }
Пример #2
0
        public void Integration_GetAllLivros_ShouldBeOkay()
        {
            List <Livro> livros = _service.PegarTodos();

            livros.Count().Should().BeGreaterThan(0);
        }