public void UpdateTest() { Rating rating = RatingManager.LoadById(5); rating.Description = "updated description"; Assert.IsTrue(RatingManager.Update(rating) > 0); }
// GET: Rating/Edit/5 public ActionResult Edit(int id) { if (Authenticate.IsAuthenticated()) { Rating rating = RatingManager.LoadById(id); return(View(rating)); } else { return(RedirectToAction("Login", "User", new { returnurl = HttpContext.Request.Url })); } }
public void UpdateTest() { Rating rating = RatingManager.LoadById(6); rating.Description = "Updated"; RatingManager.Update(rating); Rating updateddegreetype = RatingManager.LoadById(6); Assert.AreEqual(rating.Description, updateddegreetype.Description); }
// GET: api/Rating/5 public Rating Get(int id) { Rating rating = RatingManager.LoadById(id); return(rating); }