public ProcediemIntegrationTests() { serviceProvider = new ServiceCollection() .AddScoped <IProcedimentoService, ProcedimentoServices>() .AddScoped <IClienteCadastroServices, ClienteCadastroService>() .AddScoped <IFuncionarioCadastroServices, FuncionarioService>() .AddScoped <ClienteRepository, ClienteRepository>() .AddScoped <FuncionarioRepository, FuncionarioRepository>() .AddScoped <ProcedimentoRepository, ProcedimentoRepository>() .AddDbContext <CadastrosDBContext>(opt => opt.UseInMemoryDatabase("test")) .AddDbContext <ProcedimentoDBContext>(opt => opt.UseInMemoryDatabase("test")) .AddAutoMapper(typeof(FuncionarioService), typeof(ProcedimentoServices)) .AddMediatR(typeof(ProcedimentoServices)) .AddScoped <IEmailProvider, SendEmail>() .BuildServiceProvider(); _procedimentoServices = serviceProvider.GetService <IProcedimentoService>(); _clienteServices = serviceProvider.GetService <IClienteCadastroServices>(); _funcionarioServices = serviceProvider.GetService <IFuncionarioCadastroServices>(); }
public ProcedimentoController(IProcedimentoService procedimentoService) { _ProcedimentoService = procedimentoService; }
public ProcedimentoController(IProcedimentoService _service) { this._service = _service; }