public void Service_Conta_PegarContaPorId_DevePassar() { //Arrange _conta = ContaObjectMother.GetConta(); _conta.Id = 1; _repositoryFake.Setup(x => x.GetById(It.IsAny <int>())).Returns(_conta); //Action var recebido = _service.GetById(_conta.Id); //Verify recebido.Should().NotBeNull(); _repositoryFake.Verify(x => x.GetById(_conta.Id)); }
public IHttpActionResult GetById(int id) { TraceLogManager.Info("Obtendo dados do conta por get"); return(HandleQuery <Conta, ContaViewModel>(_contaService.GetById(id))); }