static void Main(string[] args) { List<PlanoDeSaudeBase> planosDeSaude = new List<PlanoDeSaudeBase>(); planosDeSaude.Add(new PlanoDePreventSenior{CNPJ = "002.002.0002/00002-20" }); planosDeSaude.Add(new PlanoDeSaudeAmil{CNPJ = "003.003.0003/00003-30"}); planosDeSaude.Add(new PlanoDeSaudePortoSeguro{CNPJ= "004.004.0004/00004-40"}); planosDeSaude.Add(new PlanoDeSaudeSulAmerica{CNPJ="005.005.0005/00005-50"}); planosDeSaude.Add(new PlanoDeSaudeBradesco{CNPJ = "006.006.0006/00006-0"}); Paciente paciente = new Paciente("Fabio Margarito", "294.3434.3434"); paciente.DefinirPlanoDeSaude((new FabricaDePlanos(planosDeSaude)).RetornarPlanoPorCNPJ("006.006.0006/00006-0")); ServicoDePagamento servicoDePagamento = new ServicoDePagamentoVisa(); servicoDePagamento.ClienteVIP = true; servicoDePagamento.RealizarPagamento(new Cartao("1234","fabio","123"),100 ); Console.ReadKey(); }
public bool Gravar(PacienteViewModel paciente) { PlanoDeSaude planoDeSaude = new PlanoDeSaude("1234", "Teste", "Tipo Plano"); Credencial credencial = new Credencial("Fabio","FabioCPF"); Paciente pacient = new Paciente(paciente.Nome,paciente.Cpf); pacient.DefinirPlanoDeSaude(planoDeSaude); pacient.DefinirCredencial(credencial); return _repositorioPaciente.Gravar(pacient); }
public void DeveGravarUmPaciente() { //Arrange IRepositorio<Paciente> repositorioPaciente = new RepositorioPacienteMock(); //Act Paciente paciente = new Paciente("fabio", "1234"); paciente.DefinirPlanoDeSaude(new PlanoDeSaude()); var retorno = repositorioPaciente.Gravar(paciente); //Assert Assert.IsTrue(retorno); }
public void DeveAdicionarUmExame() { //arrange Agendamento agendamento = new Agendamento(); Paciente paciente = new Paciente("Fabio", "123"); paciente.DefinirPlanoDeSaude(new PlanoDeSaude()); //act agendamento.CriarAgendamento(paciente, new Medico("Joao", "1234", "1M")); agendamento.AdicionarExame(new Exame(new TipoExame("exame 1"),new DateTime(2014,10,06))); //assert Assert.IsTrue(agendamento.Exames.Count > 0); }