public void ComoAtendenteQueroCadastrarUmAgendamento() { //Arrange Agendamento agendamento = (new FabricaDeAgendamento()) .InformarExame("234", "Exame 2", 200) .InformarMedico("444", "Dr.Joao") .InformarPaciente("12345", "Fabio Margarito") .InformarExame("1234", "Exame Sangue Completo", 100) .Criar(); SessionORM sessaoNHibernate = new SessionORM(); IServicoDeCadastramentoDeAgendamento servicoDeCadastramentoDeAgendamento = new ServicoDeCadastramentoDeAgendamentoFake(sessaoNHibernate); //Act var retorno = servicoDeCadastramentoDeAgendamento.Cadastrar(agendamento); //Assert Assert.IsTrue(agendamento.Medico != null); Assert.IsTrue(agendamento.Paciente != null); Assert.IsTrue(((IList)agendamento.Exames).Count > 0); Assert.IsTrue(retorno); }
public void ComoAtendenteQueroCadastrarUmAgendamento() { //Arrange Agendamento agendamento = (new FabricaDeAgendamento()) .InformarExame("234","Exame 2",200) .InformarMedico("444", "Dr.Joao") .InformarPaciente("12345", "Fabio Margarito") .InformarExame("1234", "Exame Sangue Completo", 100) .Criar(); SessionORM sessaoNHibernate = new SessionORM(); IServicoDeCadastramentoDeAgendamento servicoDeCadastramentoDeAgendamento = new ServicoDeCadastramentoDeAgendamentoFake(sessaoNHibernate); //Act var retorno = servicoDeCadastramentoDeAgendamento.Cadastrar(agendamento); //Assert Assert.IsTrue(agendamento.Medico!=null); Assert.IsTrue(agendamento.Paciente != null); Assert.IsTrue(((IList) agendamento.Exames).Count >0); Assert.IsTrue(retorno); }