Пример #1
0
        public Agendamento Criar()
        {
            Agendamento agendamento = new Agendamento();

            agendamento.InformarMedico(_medico);
            agendamento.InformarPaciente(_paciente);
            agendamento.InformarCID(_cid);
            return(agendamento);
        }
Пример #2
0
        public FabricaDeAgendamento InformarPaciente(string cpf, string Nome)
        {
            PlanoDeSaude planoDeSaude = new PlanoDeSaude();

            planoDeSaude.CNPJ        = "123456";
            planoDeSaude.RazaoSocial = "AAAA";
            Paciente paciente = new Paciente(cpf, Nome);

            paciente.InformarPlanoDeSaude(planoDeSaude);

            _Agendamento.InformarPaciente(paciente);
            return(this);
        }
Пример #3
0
        public void EuComoAtendenteQueroInicarUmAgendamento()
        {
            //Arrange
            Agendamento agendamento = new Agendamento();
            Medico      medico      = new Medico("12345", "Fabio");
            Paciente    paciente    = new Paciente("2345", "Joao");
            CID         cid         = new CID("21-9", "Virose");



            //Act
            agendamento.InformarMedico(medico);
            agendamento.InformarCID(cid);
            agendamento.InformarPaciente(paciente);


            //Assert
            Assert.IsTrue(agendamento.Medico.Crm == "12345");
            Assert.IsTrue(agendamento.Paciente.Cpf == "2345");
            Assert.IsTrue(agendamento.Cid.Numero == "21-9");
        }
Пример #4
0
        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());
        }