public void AccServiceTypesEdit() { AccomodationServiceTypesController controller = new AccomodationServiceTypesController(); AccomodationServiceType st = new AccomodationServiceType(); st.AccomodationServiceTypeId = 1; st.Name = "PlayGround"; var result = controller.Edit(st); Assert.IsInstanceOfType(result, typeof(RedirectToRouteResult)); Assert.IsTrue(controller.ModelState.IsValid); }
public void AccServiceTypesEditId() { AccomodationServiceTypesController controller = new AccomodationServiceTypesController(); var result = (HttpStatusCodeResult)controller.Edit((int?)null); Assert.AreEqual(400, result.StatusCode); Assert.IsInstanceOfType(result, typeof(HttpStatusCodeResult)); }