Beispiel #1
0
        public void Service_FaturamentoLoterica_Deveria_Chamar_GetByConcursoId_do_Repository()
        {
            _faturamentoLoterica = Loterica.Common.Tests.Lotericas.ObjectMother.GetFaturamentoComId();
            _faturamentoLoterica.CalcularFaturamentoELucro(1000, 10);

            _faturamentoLotericaRepository
            .Setup(x => x.GetByConcursoId(It.IsAny <int>()))
            .Returns(_faturamentoLoterica);

            FaturamentoLoterica faturamentoRecebido = _service.GetByConcursoId(_faturamentoLoterica.concurso.Id);

            _faturamentoLotericaRepository
            .Verify(x => x.GetByConcursoId(_faturamentoLoterica.concurso.Id));

            faturamentoRecebido.Should().BeEquivalentTo(_faturamentoLoterica);
        }
Beispiel #2
0
        public void Integration_PegarConcursoIdDeFaturamentoLoterica_Corretamente()
        {
            FaturamentoLoterica f = _service.GetByConcursoId(2);

            f.Should().NotBeNull();
        }
Beispiel #3
0
        public void Integration_PegarFaturamentoLotericaPorId_Corretamente()
        {
            FaturamentoLoterica f = _service.Get(1);

            f.Should().NotBeNull();
        }
Beispiel #4
0
        public void Infra_FaturamentoLoterica_SQLRepository_Deveria_PegarPorId()
        {
            FaturamentoLoterica faturamento = _faturamentoLotericaRepository.GetById(1);

            faturamento.Should().NotBeNull();
        }