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