예제 #1
0
 public MetaGuidanceService(
     IFileStorageService fileStorageService,
     IMetaGuidanceSubjectService metaGuidanceSubjectService)
 {
     _fileStorageService         = fileStorageService;
     _metaGuidanceSubjectService = metaGuidanceSubjectService;
 }
예제 #2
0
 private static MetaGuidanceService SetupMetaGuidanceService(
     IFileStorageService fileStorageService = null,
     IMetaGuidanceSubjectService metaGuidanceSubjectService = null)
 {
     return(new MetaGuidanceService(
                fileStorageService ?? new Mock <IFileStorageService>().Object,
                metaGuidanceSubjectService ?? new Mock <IMetaGuidanceSubjectService>().Object
                ));
 }
예제 #3
0
 public MetaGuidanceService(ContentDbContext contentDbContext,
                            IPersistenceHelper <ContentDbContext> contentPersistenceHelper,
                            IMetaGuidanceSubjectService metaGuidanceSubjectService,
                            StatisticsDbContext statisticsDbContext,
                            IUserService userService,
                            IFileRepository fileRepository)
 {
     _contentDbContext           = contentDbContext;
     _contentPersistenceHelper   = contentPersistenceHelper;
     _metaGuidanceSubjectService = metaGuidanceSubjectService;
     _statisticsDbContext        = statisticsDbContext;
     _userService    = userService;
     _fileRepository = fileRepository;
 }
 private static MetaGuidanceService SetupMetaGuidanceService(
     ContentDbContext contentDbContext,
     StatisticsDbContext statisticsDbContext = null,
     IPersistenceHelper <ContentDbContext> contentPersistenceHelper = null,
     IMetaGuidanceSubjectService metaGuidanceSubjectService         = null,
     IUserService userService       = null,
     IFileRepository fileRepository = null)
 {
     return(new MetaGuidanceService(
                contentDbContext,
                contentPersistenceHelper ?? new PersistenceHelper <ContentDbContext>(contentDbContext),
                metaGuidanceSubjectService ?? new Mock <IMetaGuidanceSubjectService>().Object,
                statisticsDbContext ?? new Mock <StatisticsDbContext>().Object,
                userService ?? MockUtils.AlwaysTrueUserService().Object,
                fileRepository ?? new FileRepository(contentDbContext)
                ));
 }
 private MetaGuidanceService SetupMetaGuidanceService(
     ContentDbContext contentDbContext       = null,
     StatisticsDbContext statisticsDbContext = null,
     IPersistenceHelper <ContentDbContext> contentPersistenceHelper = null,
     IMetaGuidanceSubjectService metaGuidanceSubjectService         = null,
     IUserService userService       = null,
     IFileRepository fileRepository = null)
 {
     return(new MetaGuidanceService(
                contentDbContext ?? new Mock <ContentDbContext>().Object,
                contentPersistenceHelper ?? DefaultPersistenceHelperMock().Object,
                metaGuidanceSubjectService ?? new Mock <IMetaGuidanceSubjectService>().Object,
                statisticsDbContext ?? new Mock <StatisticsDbContext>().Object,
                userService ?? new Mock <IUserService>().Object,
                fileRepository ?? new FileRepository(contentDbContext)
                ));
 }