public void Setup() { HttpContext.Current = SessionFactory.Create(); servicePessoa = new InMemoryServicePessoa(); controller = new PessoaController(servicePessoa, new InMemoryServiceCidade()); controller.ControllerContext = new ControllerContext(new RequestContext(), controller); }
public void TestMethod1(IServicePessoa servicePessoa) { //Teste Unitário //_pessoa = new Domain.Entities.Pessoa("Almeida", "11040128637", "GO", "01/01/2000"); //Teste de CRUD request = new PessoaRequest("Paulo", "11040128637", "01/01/2000", "GO", "123456"); _servicePessoa = servicePessoa; PessoaResponse response = _servicePessoa.CadastrarPessoa(request); if (response == null) { throw new Exception("Erro"); } }
public PessoaController(IUnitOfWork unitOfWork, IServicePessoa servicePessoa) : base(unitOfWork) { _servicePessoa = servicePessoa; }
public AppServicePessoa(IServicePessoa _serviceUsuario) { serviceUsuario = _serviceUsuario; }
public AppServicePessoa(IServicePessoa pessoa) : base(pessoa) { _pessoa = pessoa; }
public PessoaController(IHttpContextAccessor httpContextAccessor, IUnitOfWork unitOfWork, IServicePessoa servicePessoa) : base(unitOfWork) { _httpContextAccessor = httpContextAccessor; _servicePessoa = servicePessoa; }
public PessoaController(IServicePessoa servicePessoa, IServiceCidade serviceCidade) { _servicePessoa = servicePessoa; _serviceCidade = serviceCidade; }
public PessoaController(IServicePessoa service) { _service = service; }