public void Test_Delete_DeletesStudentAssociationsFromDatabase() { //Arrange Class testClass = new Class("History"); testClass.Save(); string testDescription = "Steve"; Student testStudent = new Student(testDescription); testStudent.Save(); //Act testStudent.AddClass(testClass); testStudent.Delete(); List <Student> resultClassStudents = testClass.GetStudents(); List <Student> testClassStudents = new List <Student> { }; //Assert Assert.Equal(testClassStudents, resultClassStudents); }
public void Test_Delete_DeletesStudentAssociationsFromDatabase() { //Arrange Course testCourse = new Course("Intro to CS"); testCourse.Save(); string testName = "Accounting"; string testDate = "01/03/2017"; Student testStudent = new Student(testName, testDate); testStudent.Save(); //Act testStudent.AddCourse(testCourse); testStudent.Delete(); List <Student> resultCourseStudents = testCourse.GetStudents(); List <Student> testCourseStudents = new List <Student> { }; //Assert Assert.Equal(testCourseStudents, resultCourseStudents); }