public void Integration_AdicionarAposta_Corretamente() { _aposta = ObjectMother.GetAposta(); _service.Adicionar(_aposta); var recebeAposta = _service.Get(2); recebeAposta.Should().NotBeNull(); recebeAposta.numerosApostados.Should().BeEquivalentTo(_aposta.numerosApostados); }
public void Aposta_ServiceTest_GetBet_ShouldBeOk() { Aposta apostaToFind = ObjectMother.GetAposta(_bolao, _concurso); apostaToFind._Dezenas = ObjectMother.GetListDezenas(apostaToFind); apostaToFind.id = 1; _mockRepository.Setup(ar => ar.Get(apostaToFind.id)).Returns(apostaToFind); Action comparation = () => _service.Get(apostaToFind.id); comparation.Should().NotThrow(); _mockRepository.Verify(ar => ar.Get(apostaToFind.id)); }
public void Service_Aposta_Deveria_BuascarPorId_Aposta_Corretamente() { _aposta = ObjectMother.GetApostaComId(); _apostaRepository .Setup(x => x.GetById(It.IsAny <int>())) .Returns(_aposta); Aposta a = _service.Get(_aposta.Id); _apostaRepository.Verify(x => x.GetById(_aposta.Id)); a.numerosApostados.Should().BeEquivalentTo(_aposta.numerosApostados); }