public void EditForAccountAdminViewModel() { using (ShimsContext.Create()) { ShimAccountLogics.AllInstances.GetUserForAdminInt32 = (accountsLogics, id) => userlist[0]; var result = controller.Edit(userlist[0]); Assert.IsNotNull(result); } }
public void EditTest() { using (ShimsContext.Create()) { ShimAccountLogics.AllInstances.GetUserForAdminInt32 = (accountsLogics, id) => userlist[0]; AccountAdminController controller = new AccountAdminController(); var result = controller.Edit(1) as ViewResult; var resultModel = result.Model; Assert.IsNotNull(result); Assert.AreEqual(userlist[0], resultModel); } }