public void UpdateTest() { PersonalProject project = new PersonalProject(); project.Id = 5; project.LoadById(); project.Languages = "C#"; project.Update(); project.LoadById(); Assert.AreEqual("C#", project.Languages); }
public void LoadByIdTest() { PersonalProject project = new PersonalProject(); project.Id = 5; project.LoadById(); Assert.AreEqual("Test Demo", project.Demonstration); }
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 Delete(int id) { if (Session["user"] != null) { PersonalProject project = new PersonalProject(); project.Id = id; project.LoadById(); return(View(project)); } else { return(RedirectToAction("Login", "Login")); } }