public void StudentCreateTestValidStudent() { var db = new TestStudentIspitiContext(); db.Initialize(); StudentController controller = new StudentController(db); Student temp = new Student { BI = "07_020", Ime = "Jovan", Prezime = "Jovanovic", Adresa = "Dimitrija Tucovica 24", Grad = "Beograd" }; var result = controller.Create(temp);// as RedirectToRouteResult; Assert.IsInstanceOfType(result, typeof(RedirectToRouteResult)); var tempresult = result as RedirectToRouteResult; Assert.AreEqual("Index", tempresult.RouteValues["action"]); }
public void MarkAsModified(Student item) { }
public void MarkAsModified(Student item) { Entry(item).State = EntityState.Modified; }