public void ComoAtendenteQueroInformarNoAgendamentoOPaciente() { //Arrange Paciente paciente = new Paciente("000.000.000-12", "Fabio Margarito Martins de Barros"); Agendamento agendamento = (new FabricaDeAgendamento()).InformarMedico("1234", "Fabio").InformarAtendente("12345", "Joao").Criar(); //Act agendamento.InformarPaciente(paciente); //Assert Assert.IsTrue(agendamento.Paciente.CPF == "000.000.000-12"); }
public void ComoAtendenteQueroInformarNoAgendamentoOPaciente() { //Arrange Medico medico = new Medico("1234", "Mario Peres"); Atendente atendente = new Atendente("000.000.000-10", "Victor Cleber"); Paciente paciente = new Paciente("000.000.000-12", "Fabio Margarito Martins de Barros"); Agendamento agendamento = new Agendamento(atendente, medico); //Act agendamento.InformarPaciente(paciente); //Assert Assert.IsTrue(agendamento.Paciente.CPF == "000.000.000-12"); }
public void ComoAtendenteEuQueroCadastrarUmAgendamento() { //Arrange ServicoDeAgendamento servicoDeAgendamento = new ServicoDeAgendamento(); Medico medico = new Medico("1234", "Mario Peres"); Atendente atendente = new Atendente("000.000.000-10", "Victor Cleber"); Agendamento agendamento = new Agendamento(atendente, medico); //Act bool retorno = servicoDeAgendamento.CadastrarAgendamento(agendamento); //Assert Assert.IsTrue(retorno); }
public void ComoAtendenteEuQueroCadastrarUmAgendamento() { //Arrange ServicoDeAgendamento servicoDeAgendamento = new ServicoDeAgendamento(new AgendamentosFake()); Medico medico = new Medico("1234", "Mario Peres"); Atendente atendente = new Atendente("000.000.000-10", "Victor Cleber"); Agendamento agendamento = (new FabricaDeAgendamento()).InformarMedico("1234", "Fabio").InformarAtendente("12345", "Joao").Criar(); //Act bool retorno = servicoDeAgendamento.CadastrarAgendamento(agendamento); //Assert Assert.IsTrue(retorno); }
public void ComoAtendenteQueroInformaroNoAgendamentoOCID() { //Arrange //Arrange Agendamento agendamento = (new FabricaDeAgendamento()).InformarAtendente("12345", "Joao").InformarMedico("1234", "Fabio").Criar(); CID cid = new CID("A00 - Cólera"); //Act agendamento.InformarCID(cid); //Assert Assert.IsTrue(agendamento.CID.Descricao == "A00 - Cólera"); }
public void ComoAtendenteQueroInformarOExameDesejadoNoAgendamento() { //Arrange Medico medico = new Medico("1234", "Mario Peres"); Atendente atendente = new Atendente("000.000.000-10", "Victor Cleber"); Agendamento agendamento = new Agendamento(atendente, medico); TipoExame tipoExame = new TipoExame("0001110000111212", 10); CentroDiagnostico centroDiagnostico = new CentroDiagnostico("111.222.333/00001-11"); Exame exame = new Exame(tipoExame, centroDiagnostico, new DateTime(2015, 02, 20)); //Act agendamento.AdicionarExame(exame); //Assert Assert.IsTrue(agendamento.Exames.FirstOrDefault().TipoExame.CBHPM == "0001110000111212"); }
public void ComoAtendenteQueroInformaroNoAgendamentoOCID() { //Arrange //Arrange Medico medico = new Medico("1234", "Mario Peres"); Atendente atendente = new Atendente("000.000.000-10", "Victor Cleber"); Agendamento agendamento = new Agendamento(atendente, medico); CID cid = new CID("A00 - Cólera"); //Act agendamento.InformarCID(cid); //Assert Assert.IsTrue(agendamento.CID.Descricao == "A00 - Cólera"); }
public void ComoAtendenteQueroInformarOExameDesejadoNoAgendamentoIntegrado() { //Arrange Agendamento agendamento = (new FabricaDeAgendamento()).InformarMedico("1234", "Fabio").InformarAtendente("12345", "Joao").Criar(); TipoExame tipoExame = new TipoExame("0001110000111212", 10); CentroDiagnostico centroDiagnostico = new CentroDiagnostico("111.222.333/00001-11"); Exame exame = new Exame(tipoExame, centroDiagnostico, new DateTime(2015, 02, 20)); //Act agendamento.AdicionarExame(exame); (new ServicoDeAgendamento(new Agendamentos(_session))).CadastrarAgendamento(agendamento); //Assert Assert.IsTrue(agendamento.Exames.FirstOrDefault().TipoExame.CBHPM == "0001110000111212"); }
public void ComoMedicoQueroEmitirUmLaudoParaUmTipoExameRealizado() { //Arrange Agendamento agendamento = (new FabricaDeAgendamento()).InformarMedico("1234", "Fabio").InformarAtendente("12345", "Joao").Criar(); TipoExame tipoExame = new TipoExame("0001110000111212", 10); CentroDiagnostico centroDiagnostico = new CentroDiagnostico("111.222.333/00001-11"); Exame exame = new Exame(tipoExame, centroDiagnostico, new DateTime(2015, 02, 20)); agendamento.AdicionarExame(exame); //Act agendamento.Exames.FirstOrDefault().EmitirLaudo("Resultado XPTO", new Medico("123", "Jose")); //Assert Assert.IsTrue(agendamento.Exames.FirstOrDefault().Laudo.Resultado == "Resultado XPTO"); }
public void ComoMedicoQueroEmitirUmLaudoParaUmTipoExameRealizado() { //Arrange Medico medico = new Medico("1234", "Mario Peres"); Atendente atendente = new Atendente("000.000.000-10", "Victor Cleber"); Agendamento agendamento = new Agendamento(atendente, medico); TipoExame tipoExame = new TipoExame("0001110000111212", 10); CentroDiagnostico centroDiagnostico = new CentroDiagnostico("111.222.333/00001-11"); Exame exame = new Exame(tipoExame, centroDiagnostico, new DateTime(2015, 02, 20)); agendamento.AdicionarExame(exame); //Act agendamento.Exames.FirstOrDefault().EmitirLaudo("Resultado XPTO", new Medico("123", "Jose")); //Assert Assert.IsTrue(agendamento.Exames.FirstOrDefault().Laudo.Resultado == "Resultado XPTO"); }
public void ComoAtendenteQueroCalcularOValorTotalDoAgendamento() { //Arrange Agendamento agendamento = (new FabricaDeAgendamento()).InformarMedico("1234", "Fabio").InformarAtendente("12345", "Joao").Criar(); TipoExame tipoExame = new TipoExame("0001110000111212", 10); CentroDiagnostico centroDiagnostico = new CentroDiagnostico("111.222.333/00001-11"); Exame exame = new Exame(tipoExame, centroDiagnostico, new DateTime(2015, 02, 20)); agendamento.AdicionarExame(exame); agendamento.AdicionarExame(exame); //Act var retorno = agendamento.CalcularValorTotal(); //Assert Assert.IsTrue(retorno == 20); }
public void ComoAtendenteQueroCalcularOValorTotalDoAgendamento() { //Arrange Medico medico = new Medico("1234", "Mario Peres"); Atendente atendente = new Atendente("000.000.000-10", "Victor Cleber"); Agendamento agendamento = new Agendamento(atendente, medico); TipoExame tipoExame = new TipoExame("0001110000111212", 10); CentroDiagnostico centroDiagnostico = new CentroDiagnostico("111.222.333/00001-11"); Exame exame = new Exame(tipoExame, centroDiagnostico, new DateTime(2015, 02, 20)); agendamento.AdicionarExame(exame); agendamento.AdicionarExame(exame); //Act var retorno = agendamento.CalcularValorTotal(); //Assert Assert.IsTrue(retorno == 20); }
public bool Gravar(Agendamento agendamento) { _session.SaveOrUpdate(agendamento); _session.Flush(); return(true); }