public virtual void AdicionarExame(Exame exame) { if(Exames==null) Exames = new List<Exame>(); if(exame.ID ==null) throw new Exception("ID inválido"); IServicoDeConsultaAPlanoDeSaude servicoDeConsultaAPlanoDeSaude = new ServicoDeConsultaAPlanoDeSaudeFake(); var retorno = servicoDeConsultaAPlanoDeSaude.ConsultarCobertura(exame.TipoExame, this.PlanoDeSaude); //incluir regra para zerar ou não o valor do exame ((IList<Exame>) Exames).Add(exame); }
public void ComoAtendenteQueroConsultarACoberturadeUmTipoDeExame() { //Arrange Exame exame = new Exame(); exame.InformarTipoExame(new TipoExame("1023")); IServicoDeConsultaAPlanoDeSaude servicoDeConsultaAPlanoDeSaude = new ServicoDeConsultaAPlanoDeSaudeFake(); //Act var retorno = servicoDeConsultaAPlanoDeSaude.ConsultarCobertura(exame.TipoExame, new PlanoSaude("PortoMaster")); //Assert Assert.IsTrue(retorno); }
public virtual void AdicionarExame(Exame exame) { if (Exames == null) { Exames = new List <Exame>(); } if (exame.ID == null) { throw new Exception("ID inválido"); } IServicoDeConsultaAPlanoDeSaude servicoDeConsultaAPlanoDeSaude = new ServicoDeConsultaAPlanoDeSaudeFake(); var retorno = servicoDeConsultaAPlanoDeSaude.ConsultarCobertura(exame.TipoExame, this.PlanoDeSaude); //incluir regra para zerar ou não o valor do exame ((IList <Exame>)Exames).Add(exame); }
public void ComoAtendenteQueroIncluirUmExameDoPaciente() { //Arrange Agendamento agendamento = new Agendamento(); Medico medico = new Medico("12345", "Fabio"); Paciente paciente = new Paciente("2345", "Joao"); CID cid = new CID("21-9", "Virose"); Exame exame = new Exame("12342323232"); //Act agendamento.InformarMedico(medico); agendamento.InformarCID(cid); agendamento.InformarPaciente(paciente); agendamento.AdicionarExame(exame); //Assert Assert.IsTrue(agendamento.Medico.Crm == "12345"); Assert.IsTrue(agendamento.Paciente.Cpf == "2345"); Assert.IsTrue(agendamento.Cid.Numero == "21-9"); Assert.IsTrue(agendamento.Exames.Any()); }