Beispiel #1
0
        public void Integration_AdicionarBoloes_Corretamente()
        {
            _bolao = ObjectMother.GetBolao();
            _service.Adicionar(_bolao);
            var recebeBolao = _service.Get(2);

            recebeBolao.Should().NotBeNull();
            recebeBolao.valorTotalApostasBolao.Should().Be(_bolao.valorTotalApostasBolao);
        }
Beispiel #2
0
        public void Service_Bolao_Deveria_Adicionar_Bolao()
        {
            _bolao = ObjectMother.GetBolao();

            _repository
            .Setup(x => x.Adicionar(It.IsAny <Bolao>()))
            .Returns(new Bolao
            {
                apostas  = _bolao.apostas,
                concurso = _bolao.concurso,
                valorTotalApostasBolao = _bolao.valorTotalApostasBolao,
                Id = 1
            });

            _service.Adicionar(_bolao);
            _repository.Verify(x => x.Adicionar(_bolao));
        }