public void FindById() { //Arrange var hypothermiaId = _dataContext.Hypothermias.First().Id; //Act var hypothermia = _hypothermiaService.FindById(hypothermiaId); //Assert Assert.That(hypothermia, Is.Not.Null); Assert.That(hypothermia.Id, Is.EqualTo(hypothermiaId)); }
// GET: Hypothermia/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var hypothermia = _hypothermiaService.FindById((int)id); if (hypothermia == null) { return(HttpNotFound()); } return(View(new EditHypothermiaViewModel(hypothermia))); }