示例#1
0
        public void RemoveTest()
        {
            PrerequisitesForCourseService.Remove(Course.Id, Qualification.Id);
            var removed = PrerequisitesForCourseService.GetFromIdPair(Course.Id, Qualification.Id);

            Assert.AreEqual(removed.Id, -1);
        }
示例#2
0
 public PrerequisitesForCourseServiceTest()
 {
     TecAppContext = new TecAppContext();
     PrerequisitesForCourseService = new PrerequisitesForCourseService(TecAppContext);
     QualificationsService         = new QualificationsService.QualificationsService(TecAppContext);
     CourseService = new CourseService.CourseService(TecAppContext);
 }
示例#3
0
        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
            });
        }
示例#4
0
        public void GetTest()
        {
            var added = PrerequisitesForCourseService.GetFromIdPair(Course.Id, Qualification.Id);

            Assert.AreEqual(added.Id, PrerequisitesForCourse.Id);
        }