public void Edit() { ReleasePlanController controller = new ReleasePlanController(); Task <ActionResult> result = controller.Edit(1) as Task <ActionResult>; Assert.IsNotNull(result); }
public void Edit_NullAgr() { ReleasePlanController controller = new ReleasePlanController(); Task <ActionResult> result = controller.Edit((int?)null) as Task <ActionResult>; Assert.IsTrue((result.Result as HttpStatusCodeResult).StatusCode == (int)HttpStatusCode.BadRequest); }
public void Edit_EntityAgr_IsValid() { ReleasePlanController controller = new ReleasePlanController(); Mock <ReleasePlanEntity> mock = new Mock <ReleasePlanEntity>(); Task <ActionResult> result = controller.Edit(mock.Object) as Task <ActionResult>; Assert.IsTrue((result.Result as HttpStatusCodeResult).StatusCode == (int)HttpStatusCode.BadRequest); }