コード例 #1
0
 // Constructor for unit testing
 public TeacherCoursesService(IUisDataContext dbContext, MockedCourseRepository mockedCourseRepository)
     : base(dbContext)
 {
     this.CoursesRepository = mockedCourseRepository;
     this.SeedCourses();
     this.SeedTeachers();
 }
コード例 #2
0
 // Constructor for unit testing
 public StudentsCoursesService(IUisDataContext dbContext,
                               MockedStudentsCoursesRepository mockedStudentsCoursesRepository,
                               MockedCourseRepository mockedCourseRepository,
                               MockedStudentsRepository mockedStudentsRepository)
     : base(dbContext)
 {
     this.StudentsCoursesRepository = mockedStudentsCoursesRepository;
     this.StudentRepository         = mockedStudentsRepository;
     this.CoursesRepository         = mockedCourseRepository;
     this.SeedCourses();
     this.SeedStudents();
 }