// GET: ServiceTypes/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var servicetype = Service.GetById(id.GetValueOrDefault()); if (servicetype == null) { return(HttpNotFound()); } return(View(servicetype)); }
public void GetServiceType() { var result = _service.GetById("1"); var actual = GetFakeData()[0]; Assert.AreEqual(result.Name, actual.Name); }