public void getTeacherFromDbByName() { string name = "Fornavn"; Teacher searchedTeacher; using (var tc = new TeacherContext()) { searchedTeacher = tc.GetTeacher(name); } Assert.IsNotNull(searchedTeacher); }
public void getTeacherFromDb() { int id = 1; Teacher searchedTeacher; using (var tc = new TeacherContext()) { searchedTeacher = tc.GetTeacher(id); } Assert.IsNotNull(searchedTeacher.Id); }
public void getTeacherFromDbAndEditIt() { int id = 1; bool didWeEdit = false; Teacher searchedTeacher; using (var tc = new TeacherContext()) { searchedTeacher = tc.GetTeacher(id); searchedTeacher.FirstName = "New Name"; didWeEdit = tc.EditTeacher(searchedTeacher); } Assert.IsTrue(didWeEdit); }