// GET: TipoexameController/Details/5 public ActionResult Details(int id) { Tipoexame tipoExame = _tipoexameService.Obter(id); TipoexameModel tipoExameModel = _mapper.Map <TipoexameModel>(tipoExame); return(View(tipoExameModel)); }
public void InserirTest() { // Act _tipoexameService.Inserir(new Tipoexame() { IdTipoExame = 4, Tipo = "Vitamina D" }); // Assert Assert.AreEqual(4, _tipoexameService.ObterTodos().Count()); var tipoexame = _tipoexameService.Obter(4); Assert.AreEqual("Vitamina D", tipoexame.Tipo); //Assert.AreEqual(DateTime.Parse("1975-12-25"), tipoexame.DataNascimento); }
// GET: ExameController/Details/5 public ActionResult Details(int id) { Exame exame = _exameService.Obter(id); Consulta consulta = _consultaService.Obter(exame.IdConsulta); Animal animal = _animalService.Obter(exame.IdAnimal); Tipoexame tipoExame = _tipoexameService.Obter(exame.IdTipoExame); ViewBag.IdConsulta = consulta.Descricao; ViewBag.IdAnimal = animal.Nome; ViewBag.IdTipoExame = tipoExame.Tipo; ExameModel exameModel = _mapper.Map <ExameModel>(exame); return(View(exameModel)); }