コード例 #1
0
 // Constructor for unit testing
 public MessagesService(IUisDataContext dbContext, MockedMessagesRepository mockedMessagesRepository)
     : base(dbContext)
 {
     this.MessagesRepository = mockedMessagesRepository;
     this.SeedStudents();
     this.SeedTeachers();
 }
コード例 #2
0
 // Constructor for unit testing
 public TeacherCoursesService(IUisDataContext dbContext, MockedCourseRepository mockedCourseRepository)
     : base(dbContext)
 {
     this.CoursesRepository = mockedCourseRepository;
     this.SeedCourses();
     this.SeedTeachers();
 }
コード例 #3
0
 public UsersService(IUisDataContext dbContext, MockedUsersRepository mockedUsersRepository)
     : base(dbContext)
 {
     this.ApplicationUserRepository = mockedUsersRepository;
     this.SeedStudents();
     this.SeedTeachers();
 }
コード例 #4
0
 protected Service(IUisDataContext dbContext)
 {
     this.dbContext = dbContext;
     this.ApplicationUserRepository = new DbRepository <ApplicationUser>(dbContext);
     this.CoursesRepository         = new DbRepository <Course>(dbContext);
     this.StudentRepository         = new DbRepository <Student>(dbContext);
     this.TeacherRepository         = new DbRepository <Teacher>(dbContext);
     this.StudentsCoursesRepository = new DbRepository <StudentCourse>(dbContext);
     this.MessagesRepository        = new DbRepository <Message>(dbContext);
 }
コード例 #5
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();
 }
コード例 #6
0
 public MessagesService(IUisDataContext dbContext)
     : base(dbContext)
 {
 }
 public AdminCoursesService(IUisDataContext dbContext)
     : base(dbContext)
 {
 }
コード例 #8
0
 public MockedMessagesRepository(IUisDataContext dbContext)
     : base(dbContext)
 {
     this.DbSet = new MockedDbSet <Message>();
 }
コード例 #9
0
 public MockedStudentsCoursesRepository(IUisDataContext dbContext)
     : base(dbContext)
 {
     this.DbSet = new MockedDbSet <StudentCourse>();
 }
コード例 #10
0
 public TeacherCoursesService(IUisDataContext dbContext)
     : base(dbContext)
 {
 }
 public TeacherStudentsService(IUisDataContext dbContext, MockedStudentsCoursesRepository mockedStudentsCoursesRepository)
     : base(dbContext)
 {
     this.StudentsCoursesRepository = mockedStudentsCoursesRepository;
     this.SeedStudentsCourses();
 }
コード例 #12
0
 public UsersService(IUisDataContext dbContext)
     : base(dbContext)
 {
 }
コード例 #13
0
 public StudentsCoursesService(IUisDataContext dbContext)
     : base(dbContext)
 {
 }
コード例 #14
0
 protected BaseTest()
 {
     this.dbContext = new MockedUisDbContext();
     this.SeedData();
     MapperConfig.ConfigureAutomapper();
 }
コード例 #15
0
 public MockedCourseRepository(IUisDataContext dbContext)
     : base(dbContext)
 {
     this.DbSet = new MockedCoursesDbSet();
 }
 public MockedStudentsRepository(IUisDataContext dbContext)
     : base(dbContext)
 {
     this.DbSet = new MockedStudentsDbSet();
 }
 public TeacherStudentsService(IUisDataContext dbContext)
     : base(dbContext)
 {
 }
コード例 #18
0
 public MockedTeachersRepository(IUisDataContext dbContext)
     : base(dbContext)
 {
     this.DbSet = new MockedTeachersDbSet();
 }
コード例 #19
0
 public DbRepository(IUisDataContext dbContext)
 {
     this.DbSet = dbContext.Set <T>();
 }
コード例 #20
0
 public TeachersService(IUisDataContext dbContext, MockedTeachersRepository mockedTeachersRepository)
     : base(dbContext)
 {
     this.TeacherRepository = mockedTeachersRepository;
     this.SeedTeachers();
 }