public void T5_Find() { //Arrange DateTime Date1 = new DateTime(2016, 08, 01); Student student1 = new Student("Jon", "Jone", "*****@*****.**", "/img/jon.jpg", Date1); student1.Save(); //Act Student result = Student.Find(student1.GetId()); //Assert Assert.Equal(student1, result); }
public void T4_SaveToId() { //Arrange DateTime Date1 = new DateTime(2016, 08, 01); Student student1 = new Student("Jon", "Jone", "*****@*****.**", "/img/jon.jpg", Date1); student1.Save(); //Act //Student savedId = Student.GetAll()[0]; Student savedId = Student.Find(student1.GetId()); int result = savedId.GetId(); int testId = student1.GetId(); //Assert Assert.Equal(testId, result); }