Ejemplo n.º 1
0
        public LecturesServiceGetVideoByLectureIdTests()
        {
            AutoMapperConfig.RegisterMappings(typeof(ErrorViewModel).GetTypeInfo().Assembly);
            this.db = new CoursesP2PDbContext(MemoryDatabase.OptionBuilder());

            this.lecturesService = new LecturesService(this.db);
        }
Ejemplo n.º 2
0
        private ILecturesService SetupLecturesService(IRepository <Lecture> lectures = null, IRepository <LectureVisit> lectureVisits = null, IUserService users = null)
        {
            if (lectures == null)
            {
                lectures = new Mock <IRepository <Lecture> >().Object;
            }
            if (lectureVisits == null)
            {
                lectureVisits = new Mock <IRepository <LectureVisit> >().Object;
            }
            if (users == null)
            {
                users = new Mock <IUserService>().Object;
            }

            LecturesService lecturesService = new LecturesService(lectures, lectureVisits, users);

            return(lecturesService);
        }
 public GetLectureBindingModelWithCourseIdTests()
 {
     this.db = new CoursesP2PDbContext(MemoryDatabase.OptionBuilder());
     this.lecturesService = new LecturesService(this.db);
 }
        public LecturesServiceGetLecturesByCourseIdAsyncTests()
        {
            this.db = new CoursesP2PDbContext(MemoryDatabase.OptionBuilder());

            this.lecturesService = new LecturesService(this.db);
        }