public void RemoveTest() { PrerequisitesForCourseService.Remove(Course.Id, Qualification.Id); var removed = PrerequisitesForCourseService.GetFromIdPair(Course.Id, Qualification.Id); Assert.AreEqual(removed.Id, -1); }
public PrerequisitesForCourseServiceTest() { TecAppContext = new TecAppContext(); PrerequisitesForCourseService = new PrerequisitesForCourseService(TecAppContext); QualificationsService = new QualificationsService.QualificationsService(TecAppContext); CourseService = new CourseService.CourseService(TecAppContext); }
public void AddTest() { var random = new Random(); Qualification = QualificationsService.GetAllQualifications()[random.Next(10)]; Course = CourseService.GetAllCourses()[random.Next(100)]; PrerequisitesForCourse = PrerequisitesForCourseService.Add(new PrerequisitesForCourse() { Qualification = Qualification, QualificationId = Qualification.Id, Course = Course, CourseId = Course.Id }); }
public void GetTest() { var added = PrerequisitesForCourseService.GetFromIdPair(Course.Id, Qualification.Id); Assert.AreEqual(added.Id, PrerequisitesForCourse.Id); }