public void TeamProfilesController_Create_Test1() { // Initialization TeamProfilesController ctl = new TeamProfilesController(); // To test if it is null var result = ctl.Create(); Assert.IsNotNull(result); // To test if its contents var model = (ProfileIndexViewModel)((ViewResult)result).Model; Assert.AreEqual("~/Images/no_image.jpg", model.teamProfile.pic); }
public void TeamProfilesController_Create_Test2() { // Initialization TeamProfilesController ctl = new TeamProfilesController(); // To test if it is null var result = ctl.Create(); Assert.IsNotNull(result); // To test if its contents var model = (ProfileIndexViewModel)((ViewResult)result).Model; Assert.AreEqual(0, model.teamProfile.profile_id); Assert.IsNull(model.teamProfile.name); Assert.IsNull(model.teamProfile.detail); Assert.AreEqual(0, model.teamProfile.status); }