public static void ClassInitialize(TestContext _)
 {
     _setRepository           = new SetRepository(MemoryRepositoryService);
     _referenceDataRepository = new ReferenceDataRepository(MemoryRepositoryService);
     _themeRepository         = new ThemeRepository(MemoryRepositoryService);
     _subthemeRepository      = new SubthemeRepository(MemoryRepositoryService);
 }
예제 #2
0
 public ThemeController(IThemeRepository themes, IInstallationManager installationManager, IWebHostEnvironment environment, ILogManager logger)
 {
     _themes = themes;
     _installationManager = installationManager;
     _environment         = environment;
     _logger = logger;
 }
예제 #3
0
 public ThemeController(IThemeRepository Themes, IInstallationManager InstallationManager, IWebHostEnvironment environment, ILogManager logger)
 {
     this.Themes = Themes;
     this.InstallationManager = InstallationManager;
     this.environment         = environment;
     this.logger = logger;
 }
예제 #4
0
 public ThemeProvider(
     ISiteManifestRepository siteManifestRepository,
     IThemeRepository themeRepository)
 {
     _siteManifestRepository = siteManifestRepository;
     _themeRepository        = themeRepository;
 }
 public static void ClassInitialize(TestContext _)
 {
     _bricksetUserRepository = new BricksetUserRepository(MemoryRepositoryService);
     _themeRepository        = new ThemeRepository(MemoryRepositoryService);
     _subthemeRepository     = new SubthemeRepository(MemoryRepositoryService);
     _setRepository          = new SetRepository(MemoryRepositoryService);
 }
예제 #6
0
 public static IMediaSourceHelper GetMediaSource(FeedModel fm, IThemeRepository themeRepository)
 {
     if (fm.Source != null)
     {
         return(GetMediaSource(fm.Source.Source, themeRepository));
     }
     return(null);
 }
예제 #7
0
 public static IMediaSourceHelper GetMediaSource(ArticleModel am, IThemeRepository themeRepository)
 {
     if (am.Feed?.Source != null)
     {
         return(GetMediaSource(am.Feed.Source.Source, themeRepository));
     }
     return(null);
 }
 public RoomController(IGameRoomRepository roomRepo, IPlayerScoreRepository scoreRepo, IPlayerRepository playerRepo, IDrawingRepository drawingRepo, IThemeRepository themeRepo)
 {
     _roomRepository    = roomRepo;
     _themeRepository   = themeRepo;
     _scoreRepository   = scoreRepo;
     _playerRepository  = playerRepo;
     _drawingRepository = drawingRepo;
 }
예제 #9
0
 public ThemeFacade(IThemeRepository themeRepository,
                    ICacheManager cacheManager,
                    IMapper mapper)
 {
     _themeRepository = themeRepository;
     _cacheManager    = cacheManager;
     _mapper          = mapper;
 }
예제 #10
0
 public CreateThemeHandler(IThemeRepository themeRepository,
                           IValidator <CreateTheme> validator,
                           IThemeSortOrderGenerator sortOrderGenerator)
 {
     _themeRepository    = themeRepository;
     _validator          = validator;
     _sortOrderGenerator = sortOrderGenerator;
 }
 public ColorsSettingsPageController(
     IColorsSettingsPage page, IThemeRepository themeRepository,
     IThemePathProvider themePathProvider)
 {
     _page              = page;
     _themeRepository   = themeRepository;
     _themePathProvider = themePathProvider;
 }
예제 #12
0
 public GalleryController(
     IMapper mapper,
     IExtensionsMetadataRepository metadataRepository,
     IThemeRepository themeStoreRepository)
 {
     _mapper             = mapper;
     _metadataRepository = metadataRepository;
     _themeRepository    = themeStoreRepository;
 }
 public ThemeSynchronizer(
     IBricksetApiService bricksetService,
     IThemeRepository themeRepository,
     IMessageHub messageHub)
 {
     _bricksetApiService = bricksetService;
     _themeRepository    = themeRepository;
     _messageHub         = messageHub;
 }
 public ColorSettingsPageTestContext(
     IColorsSettingsPage page,
     ColorsSettingsPageController controller,
     IThemeRepository themeRepository)
 {
     Page            = page;
     Controller      = controller;
     ThemeRepository = themeRepository;
 }
예제 #15
0
 public ThemeStoreRefresher(
     IVSAssetsClient assetsClient,
     IVSExtensionHandler extensionHandler,
     IThemeRepository themeRepository,
     IExtensionsMetadataRepository metadataRepository)
 {
     _assetsClient       = assetsClient;
     _extensionHandler   = extensionHandler;
     _themeRepository    = themeRepository;
     _metadataRepository = metadataRepository;
 }
예제 #16
0
        public static IMediaSourceHelper GetMediaSource(Sources source, IThemeRepository themeRepository)
        {
            switch (source)
            {
            case Sources.Nzz:
                return(new NzzHelper(themeRepository));

            case Sources.Blick:
            case Sources.BlickAmAbend:
                return(new BlickHelper(themeRepository));

            case Sources.Postillon:
                return(new PostillonHelper(themeRepository));

            case Sources.ZwanzigMin:
                return(new ZwanzigMinHelper(themeRepository));

            case Sources.Stern:
                return(new SternHelper(themeRepository));

            case Sources.Spiegel:
                return(new SpiegelHelper(themeRepository));

            case Sources.Bild:
                return(new BildHelper(themeRepository));

            case Sources.Zeit:
                return(new ZeitHelper(themeRepository));

            case Sources.Welt:
                return(new WeltHelper(themeRepository));

            case Sources.BaslerZeitung:
            case Sources.BernerZeitung:
            case Sources.DerBund:
            case Sources.Tagesanzeiger:
            case Sources.LeMatin:
            case Sources.VingtQuatreHeures:
            case Sources.TribuneDeGeneve:
            case Sources.ZuerichseeZeitung:
            case Sources.Landbote:
            case Sources.ZuericherUnterlaender:
            case Sources.BernerOeberlaender:
            case Sources.ThunerTagblatt:
            case Sources.LangenthalerTagblatt:
                return(new TamediaHelper(themeRepository));

            default:
                throw new ArgumentOutOfRangeException(nameof(source), source, null);
            }
        }
예제 #17
0
 public PagesController(
     IPageRepository pageRepository,
     IPageVersionRepository pageVersionRepository,
     IHttpContextAccessor httpContextAccessor,
     IThemeRepository themeRepository,
     IPageTemplateRepository pageTemplateRepository,
     IPageService pageService)
 {
     _pageRepository         = pageRepository;
     _pageVersionRepository  = pageVersionRepository;
     _httpContextAccessor    = httpContextAccessor;
     _themeRepository        = themeRepository;
     _pageTemplateRepository = pageTemplateRepository;
     _pageService            = pageService;
 }
예제 #18
0
        public void SetUp()
        {
            var optionsBuilder = new DbContextOptionsBuilder <WeapsyDbContext>();

            optionsBuilder.UseInMemoryDatabase();
            _dbContext = new WeapsyDbContext(optionsBuilder.Options);

            _themeId1 = Guid.NewGuid();
            _themeId2 = Guid.NewGuid();

            _dbContext.Set <ThemeDbEntity>().AddRange
            (
                new ThemeDbEntity
            {
                Id          = _themeId1,
                Name        = "Name 1",
                Description = "Description 1",
                Folder      = "Folder 1",
                Status      = ThemeStatus.Active
            },
                new ThemeDbEntity
            {
                Id          = _themeId2,
                Name        = "Name 2",
                Description = "Description 2",
                Folder      = "Folder 2",
                Status      = ThemeStatus.Active
            },
                new ThemeDbEntity
            {
                Status = ThemeStatus.Deleted
            }
            );

            _dbContext.SaveChanges();

            var mapperMock = new Mock <AutoMapper.IMapper>();

            mapperMock.Setup(x => x.Map <ThemeDbEntity>(It.IsAny <Theme>())).Returns(new ThemeDbEntity());
            mapperMock.Setup(x => x.Map <Theme>(It.IsAny <ThemeDbEntity>())).Returns(new Theme());
            mapperMock.Setup(x => x.Map <ICollection <Theme> >(It.IsAny <ICollection <ThemeDbEntity> >())).Returns(new List <Theme>
            {
                ThemeFactory.Theme(_themeId1, "Name", "Description", "Folder"),
                ThemeFactory.Theme(_themeId2, "Name", "Description", "Folder")
            });

            _sut = new ThemeRepository(_dbContext, mapperMock.Object);
        }
예제 #19
0
#pragma warning disable 4014
        public ArticleRepository(ISettingsRepository settingsRepository, IProgressService progressService, IStorageService storageService, ISqliteService sqliteService, IThemeRepository themeRepository, IImageDownloadService imageDownloadService, IPermissionsService permissionsService)
        {
            _settingsRepository = settingsRepository;
            _progressService = progressService;
            _storageService = storageService;
            _sqliteService = sqliteService;
            _themeRepository = themeRepository;
            _imageDownloadService = imageDownloadService;
            _permissionsService = permissionsService;

            _articleGenericRepository = new GenericRepository<ArticleModel, ArticleEntity>(_sqliteService);
            _imageContentGenericRepository = new GenericRepository<ImageContentModel, ImageContentEntity>(_sqliteService);
            _textContentGenericRepository = new GenericRepository<TextContentModel, TextContentEntity>(_sqliteService);
            _galleryContentGenericRepository = new GenericRepository<GalleryContentModel, GalleryContentEntity>(_sqliteService);

            Initialize();
        }
 public SetSynchronizer(
     IBricksetApiService bricksetApiService,
     ISetRepository setRepository,
     IReferenceDataRepository referenceDataRepository,
     IThemeRepository themeRepository,
     ISubthemeRepository subthemeRepository,
     IThumbnailSynchronizer thumbnailSynchronizer,
     IMessageHub messageHub)
 {
     _bricksetApiService      = bricksetApiService;
     _setRepository           = setRepository;
     _referenceDataRepository = referenceDataRepository;
     _themeRepository         = themeRepository;
     _subthemeRepository      = subthemeRepository;
     _thumbnailSynchronizer   = thumbnailSynchronizer;
     _messageHub = messageHub;
 }
예제 #21
0
#pragma warning disable 4014
        public ArticleRepository(ISettingsRepository settingsRepository, IProgressService progressService, IStorageService storageService, ISqliteService sqliteService, IThemeRepository themeRepository, IImageDownloadService imageDownloadService, IPermissionsService permissionsService)
        {
            _settingsRepository   = settingsRepository;
            _progressService      = progressService;
            _storageService       = storageService;
            _sqliteService        = sqliteService;
            _themeRepository      = themeRepository;
            _imageDownloadService = imageDownloadService;
            _permissionsService   = permissionsService;

            _articleGenericRepository        = new GenericRepository <ArticleModel, ArticleEntity>(_sqliteService);
            _imageContentGenericRepository   = new GenericRepository <ImageContentModel, ImageContentEntity>(_sqliteService);
            _textContentGenericRepository    = new GenericRepository <TextContentModel, TextContentEntity>(_sqliteService);
            _galleryContentGenericRepository = new GenericRepository <GalleryContentModel, GalleryContentEntity>(_sqliteService);

            Initialize();
        }
예제 #22
0
        public static IMediaSourceHelper GetMediaSource(Sources source, IThemeRepository themeRepository)
        {
            switch (source)
            {
                case Sources.Nzz:
                    return new NzzHelper(themeRepository);
                case Sources.Blick:
                case Sources.BlickAmAbend:
                    return new BlickHelper(themeRepository);
                case Sources.Postillon:
                    return new PostillonHelper(themeRepository);
                case Sources.ZwanzigMin:
                    return new ZwanzigMinHelper(themeRepository);
                case Sources.Stern:
                    return new SternHelper(themeRepository);
                case Sources.Spiegel:
                    return new SpiegelHelper(themeRepository);
                case Sources.Bild:
                    return new BildHelper(themeRepository);
                case Sources.Zeit:
                    return new ZeitHelper(themeRepository);
                case Sources.Welt:
                    return new WeltHelper(themeRepository);

                case Sources.BaslerZeitung:
                case Sources.BernerZeitung:
                case Sources.DerBund:
                case Sources.Tagesanzeiger:
                case Sources.LeMatin:
                case Sources.VingtQuatreHeures:
                case Sources.TribuneDeGeneve:
                case Sources.ZuerichseeZeitung:
                case Sources.Landbote:
                case Sources.ZuericherUnterlaender:
                case Sources.BernerOeberlaender:
                case Sources.ThunerTagblatt:
                case Sources.LangenthalerTagblatt:
                    return new TamediaHelper(themeRepository);
                default:
                    throw new ArgumentOutOfRangeException(nameof(source), source, null);
            }
        }
예제 #23
0
        public void Should_save_new_theme()
        {
            var newTheme         = ThemeFactory.Theme(Guid.NewGuid(), "Name 3", "Description 3", "Folder 3");
            var newThemeDbEntity = new ThemeDbEntity
            {
                Id          = newTheme.Id,
                Name        = newTheme.Name,
                Description = newTheme.Description,
                Folder      = newTheme.Folder
            };

            var mapperMock = new Mock <IMapper>();

            mapperMock.Setup(x => x.Map <ThemeDbEntity>(newTheme)).Returns(newThemeDbEntity);
            mapperMock.Setup(x => x.Map <Theme>(newThemeDbEntity)).Returns(newTheme);

            _sut = new ThemeRepository(_dbContext, mapperMock.Object);

            _sut.Create(newTheme);

            var actual = _sut.GetById(newTheme.Id);

            Assert.NotNull(actual);
        }
예제 #24
0
 public static IMediaSourceHelper GetMediaSource(FeedModel fm, IThemeRepository themeRepository)
 {
     if (fm.Source != null)
         return GetMediaSource(fm.Source.Source, themeRepository);
     return null;
 }
예제 #25
0
 public ThemeController(IThemeRepository Themes, IInstallationManager InstallationManager)
 {
     this.Themes = Themes;
     this.InstallationManager = InstallationManager;
 }
예제 #26
0
 public ActivateThemeHandler(IThemeRepository themeRepository)
 {
     _themeRepository = themeRepository;
 }
예제 #27
0
 public ThemeRules(IThemeRepository themeRepository)
 {
     _themeRepository = themeRepository;
 }
예제 #28
0
 public DeleteThemeHandler(IThemeRepository themeRepository)
 {
     _themeRepository = themeRepository;
 }
예제 #29
0
 public SettingsController(IThemeRepository themeRepository, ISettingRepository settingRepository)
 {
     this.themeRepository   = themeRepository;
     this.settingRepository = settingRepository;
 }
예제 #30
0
 protected BaseMediaSourceHelper(IThemeRepository themeRepository)
 {
     _themeRepository = themeRepository;
 }
예제 #31
0
 public PostillonHelper(IThemeRepository themeRepository) : base(themeRepository)
 {
 }
예제 #32
0
 public BildHelper(IThemeRepository themeRepository) : base(themeRepository)
 {
 }
예제 #33
0
 public SternHelper(IThemeRepository themeRepository) : base(themeRepository)
 {
 }
예제 #34
0
 public static IMediaSourceHelper GetMediaSource(ArticleModel am, IThemeRepository themeRepository)
 {
     if (am.Feed?.Source != null)
         return GetMediaSource(am.Feed.Source.Source, themeRepository);
     return null;
 }
예제 #35
0
 public TamediaHelper(IThemeRepository themeRepository) : base(themeRepository)
 {
 }
예제 #36
0
 public NzzHelper(IThemeRepository themeRepository) : base(themeRepository)
 {
 }
예제 #37
0
 public TopicController(IThemeRepository themeRepository, ITopicRepository topicRepository, ILogger<TopicController> logger)
 {
     _themeRepository = themeRepository;
     _topicRepositoryrepository = topicRepository;
     _logger = logger;
 }
예제 #38
0
 public WeltHelper(IThemeRepository themeRepository) : base(themeRepository)
 {
 }
예제 #39
0
 public WeltHelper(IThemeRepository themeRepository) : base(themeRepository)
 {
 }
 public UserController()
 {
     themeRepository = new ThemeRepository();
 }
예제 #41
0
 public ZwanzigMinHelper(IThemeRepository themeRepository) : base(themeRepository)
 {
 }
예제 #42
0
 public ThemeController(IThemeRepository Themes)
 {
     this.Themes = Themes;
 }
예제 #43
0
 public ThemeController(IThemeRepository repository, ILogger<ThemeController> logger)
 {
     _repository = repository;
     _logger = logger;
 }
 public TestingService(IThemeRepository themeRepository, IQuestionRepository questionRepository, IAnswerRepository answerRepository)
 {
     this.themeRepository = themeRepository;
     this.answerRepository = answerRepository;
     this.questionRepository = questionRepository;
 }
예제 #45
0
 public ThemeService(IUnitOfWork uow, IThemeRepository repository)
 {
     this.uow = uow;
     this.themeRepository = repository;
 }
예제 #46
0
 static ThemeHelper()
 {
     themeRepository = new ThemeRepository();
 }
예제 #47
0
 public TamediaHelper(IThemeRepository themeRepository) : base(themeRepository)
 {
 }
예제 #48
0
 public ThemeSortOrderGenerator(IThemeRepository themeRepository)
 {
     _themeRepository = themeRepository;
 }
예제 #49
0
 public SpiegelHelper(IThemeRepository themeRepository) : base(themeRepository)
 {
 }