Exemplo n.º 1
0
        public void NotaFiscal_InfraData_PegarTodos_DevePegarTodos()
        {
            notaFiscal = ObjectMother.ObterNotaValida();
            notaFiscal.Destinatario.Id  = 1;
            notaFiscal.Emitente.Id      = 1;
            notaFiscal.Transportador.Id = 1;
            notaFiscal.GerarChaveAcesso();
            notaFiscal = repositorio.Salvar(notaFiscal);

            IEnumerable <NotaFiscal> notas = repositorio.PegarTodos();

            notas.Count().Should().BeGreaterThan(0);
            notas.Last().Id.Should().Be(notaFiscal.Id);
        }