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); }
public void Bolao_TestService_GetBolao_ShouldBeOK() { Bolao bolaoToFind = ObjectMother.GetBolaoOk(_listApostas); bolaoToFind.id = 1; _mockRepository.Setup(br => br.Get(bolaoToFind.id)).Returns(bolaoToFind); Action comparation = () => _service.Get(bolaoToFind.id); comparation.Should().NotThrow(); _mockRepository.Verify(br => br.Get(bolaoToFind.id)); }
public void Service_Bolao_Deveria_Buscar_Bolao_Por_Id() { _bolao = ObjectMother.GetBolaoComId(); _repository .Setup(x => x.GetById(It.IsAny <int>())); _service.Get(_bolao.Id); _repository.Verify(x => x.GetById(_bolao.Id)); }