public AgendamentoManager() { contexto = new Contexto(); repAgendamento = new RepositorioAgendamento(contexto); repPaciente = new RepositorioPaciente(contexto); servicoAgendamento = new ServicoAgendamento(repAgendamento, repPaciente); }
public ServicoAgendamento(IRepositorioAgendamento repAgendamento, IRepositorioPaciente repPaciente) { if(repAgendamento == null) { throw new ArgumentNullException("repAgendamento"); } if(repPaciente == null) { throw new ArgumentNullException("repPaciente"); } this.repAgendamento = repAgendamento; this.repPaciente = repPaciente; }
public PacienteManager() { contexto = new Contexto(); repPaciente = new RepositorioPaciente(contexto); }
private void Mock(IRepositorioPaciente repPacienteMock) { var pacientes = repPacienteMock.obterPacientes(); foreach (var paciente in pacientes) { if (paciente == pacientes.Last()) break; var data = DateTime.Today; data = data.AddDays(5); lista.Add(new Agendamento(paciente,data,ETipoDeTratamento.Quimioterapia_Dia)); } lista.Add(new Agendamento(pacientes.Last(), DateTime.Now.AddHours(2), ETipoDeTratamento.Quimioterapia_Dia)); }
public RepositorioAgendamentoMock(IRepositorioPaciente repPacienteMock) { lista = new List<Agendamento>(); Mock(repPacienteMock); }
public ServicoDePaciente(IRepositorioPaciente repositorioPaciente) { _repositorioPaciente = repositorioPaciente; }