public ActionResult Criar(AgendamentoViewModel agendamentoViewModel) { ServicoDeAgendamento servicoDeAgendamento = new ServicoDeAgendamento(new Agendamentos()); servicoDeAgendamento.CriarAgendamento(agendamentoViewModel); return(View("CriarOK")); }
private void button1_Click(object sender, EventArgs e) { ServicoDeAgendamento servicoDeAgendamento = new ServicoDeAgendamento(new Agendamentos()); servicoDeAgendamento.CriarAgendamento(new AgendamentoViewModel { cpf = cpf.Text, crm = crm.Text, numeroCID = cid.Text }); MessageBox.Show("Gravado com sucesso!!!!"); }
public void ComoAtendenteEuQueroCriarUmAgendamento() { //Arrange AgendamentoViewModel agendamentoViewModel = new AgendamentoViewModel { crm = "2345", cpf = "2345", numeroCID = "21-9" }; //Act ServicoDeAgendamento servicoDeAgendamento = new ServicoDeAgendamento(new AgendamentosFake()); var retorno = servicoDeAgendamento.CriarAgendamento(agendamentoViewModel); Assert.IsTrue(retorno); }
public void ComoAtendenteEuQueroCriarUmAgendamento() { //arrange FabricaDeAgendamento fabricaDeAgendamento = new FabricaDeAgendamento(); //act AgendamentoViewModel agendamentoViewModel = new AgendamentoViewModel { cpf = "2345", crm = "1234", numeroCID = "21-9" }; ServicoDeAgendamento servicoDeAgendamento = new ServicoDeAgendamento(new AgendamentosFake()); var retorno = servicoDeAgendamento.CriarAgendamento(agendamentoViewModel); }
public void ComoAtendenteQueroVerificarOValorTotalDoAgendamento() { //Arrage Agendamento agendamento = (new FabricaDeAgendamento()).InformarPaciente("123") .InformarMedicoSolicitante("1234") .InformarAtendente("1234") .Criar(); agendamento.AdicionarExame(new Exame(new TipoExame("10101012", "Hemograma", 100))); //Act ServicoDeAgendamento servicoDeAgendamento = new ServicoDeAgendamento(new ServicoDeGeracaoCredencial()); var retornoAgendamento = servicoDeAgendamento.CadastrarAgendamento(agendamento); //Assert Assert.IsTrue(agendamento.CalcularValorTotal() == 100); }
public void ComoAtendenteQueroRealizarCadastrarUmAgendamento() { //Arrage Agendamento agendamento = (new FabricaDeAgendamento()).InformarPaciente("123") .InformarMedicoSolicitante("1234") .InformarAtendente("1234") .Criar(); agendamento.AdicionarExame(new Exame(new TipoExame("10101012", "Hemograma", 100))); //Act ServicoDeAgendamento servicoDeAgendamento = new ServicoDeAgendamento(new ServicoDeGeracaoCredencial()); var retornoAgendamento = servicoDeAgendamento.CadastrarAgendamento(agendamento); //Assert Assert.IsTrue(retornoAgendamento.Exames.Count() > 0); }
public void ComoMedicoDeDiagnosticoQueroEmitirUmLaudoParaUmExame() { //Arrage Agendamento agendamento = (new FabricaDeAgendamento()).InformarPaciente("123") .InformarMedicoSolicitante("1234") .InformarAtendente("1234") .Criar(); agendamento.AdicionarExame(new Exame(new TipoExame("10101012", "Hemograma", 100))); //Act ServicoDeAgendamento servicoDeAgendamento = new ServicoDeAgendamento(new ServicoDeGeracaoCredencial()); var retornoAgendamento = servicoDeAgendamento.CadastrarAgendamento(agendamento); agendamento.Exames.FirstOrDefault().EmitirLaudo(new Laudo("bla bla bla bla")); //Assert Assert.IsTrue(agendamento.Exames.FirstOrDefault().Laudo.Descricao == "bla bla bla bla"); }
public ActionResult Criar(AgendamentoViewModel agendamentoViewModel) { ServicoDeAgendamento servicoDeAgendamento = new ServicoDeAgendamento(new Agendamentos()); servicoDeAgendamento.CriarAgendamento(agendamentoViewModel); return View("CriarOK"); }