Пример #1
0
        public void Service_FaturamentoLoterica_Deveria_Editar_Faturamento()
        {
            _faturamentoLoterica = Loterica.Common.Tests.Lotericas.ObjectMother.GetFaturamentoComId();
            _faturamentoLoterica.CalcularFaturamentoELucro(100, 10);

            _faturamentoLotericaRepository
            .Setup(x => x.Editar(It.IsAny <FaturamentoLoterica>()));

            _service.Editar(_faturamentoLoterica);

            _faturamentoLotericaRepository.Verify(x => x.Editar(_faturamentoLoterica));
        }
Пример #2
0
        public void Integration_EditarFaturamentoLoterica_Corretamente()
        {
            FaturamentoLoterica faturamentoLoterica = Loterica.Common.Tests.Lotericas.ObjectMother.GetFaturamentoComId();

            faturamentoLoterica.CalcularFaturamentoELucro(10, 2);
            _service.Editar(faturamentoLoterica);
            FaturamentoLoterica f = _service.Get(faturamentoLoterica.Id);

            f.lucro.Should().Be(faturamentoLoterica.lucro);
        }