예제 #1
0
        public void Integration_ExcluirFaturamentoLoterica_Incorretamente_Retornando_Excecao()
        {
            FaturamentoLoterica faturamentoLoterica = Loterica.Common.Tests.Lotericas.ObjectMother.GetFaturamentoComId();
            Action action = () => _service.Excluir(faturamentoLoterica);

            action.Should().Throw <UnsupportedOperationException>();
        }
예제 #2
0
        public void Service_FaturamentoLoterica_Deveria_Chamar_Excluir_Faturamento_do_Repository()
        {
            _faturamentoLoterica = Loterica.Common.Tests.Lotericas.ObjectMother.GetFaturamentoComId();
            _faturamentoLoterica.CalcularFaturamentoELucro(100, 10);

            _faturamentoLotericaRepository
            .Setup(x => x.Excluir(It.IsAny <int>()));

            _service.Excluir(_faturamentoLoterica);

            _faturamentoLotericaRepository.Verify(x => x.Excluir(_faturamentoLoterica.Id));
        }