Пример #1
0
 public void VendaService_GetAll_ShouldBeOk()
 {
     _vendas = ObjectMotherSale.GetVendas();
     _vendaRepository.Setup(x => x.GetAll()).Returns(_vendas);
     _vendas = _vendaService.GetAll();
     _vendaRepository.Verify(x => x.GetAll());
     _vendas.Should().NotBeNull();
     _vendas.Should().HaveCount(1);
 }
Пример #2
0
        public void SaleSql_GetAll_ShouldBeOk()
        {
            IEnumerable <Venda> posts = ObjectMotherSale.GetVendas();

            foreach (var post in posts)
            {
                _repository.Save(post);
            }
            IEnumerable <Venda> p = _repository.GetAll();

            p.Count().Should().Be(1);
        }