public void InsertTest() { PersonalProject project = new PersonalProject(); project.Name = "Test Project"; project.Languages = "Test Languages"; project.Description = "Test Description"; project.GitHubRepository = "Test GitHub Repo"; project.Demonstration = "Test Demo"; project.Insert(); project.LoadById(); Assert.AreEqual("Test Demo", project.Demonstration); }
public ActionResult Create(PersonalProject project) { if (Session["user"] != null) { try { project.Insert(); return(RedirectToAction("Index")); } catch { return(View(project)); } } else { return(RedirectToAction("Login", "Login")); } }