public static void InitializeTestClass(TestContext testContext) { FileMergeStorageOptions fileMergeStorageOptions = new FileMergeStorageOptions() { MergeResultsStoragePath = "D:\\Temp\\FFRKApi\\MergeResults-{Date}.json" }; IOptions <FileMergeStorageOptions> fileMergeStorageOptionsWrapper = new OptionsWrapper <FileMergeStorageOptions>(fileMergeStorageOptions); CachingOptions cachingOptions = new CachingOptions() { UseCache = "false", ConnectionString = "Placeholder", DefaultTimeToLiveInHours = "2" }; IOptions <CachingOptions> cachingOptionsWrapper = new OptionsWrapper <CachingOptions>(cachingOptions); ApiExternalWebsiteOptions apiExternalWebsiteOptions = new ApiExternalWebsiteOptions() { AltemaCharacterRatingsUrl = "https://altema.jp/ffrk/charahyoka" }; IOptions <ApiExternalWebsiteOptions> apiExternalWebsiteOptionsWrapper = new OptionsWrapper <ApiExternalWebsiteOptions>(apiExternalWebsiteOptions); _fileMergeStorageProviderLogger = new Logger <FileMergeStorageProvider>(new LoggerFactory()); _cacheProviderLogger = new Logger <CacheProvider>(new LoggerFactory()); _altemaCharacterRatingLogicLogger = new Logger <CharacterRatingLogic>(new LoggerFactory()); _cacheProvider = new CacheProvider(cachingOptionsWrapper, _cacheProviderLogger); _mergeStorageProvider = new FileMergeStorageProvider(fileMergeStorageOptionsWrapper, _fileMergeStorageProviderLogger); _enlirRepository = new EnlirRepository(_mergeStorageProvider); _altemaCharacterRatingRepository = new AltemaCharacterRatingWebRepository(apiExternalWebsiteOptionsWrapper); }
public FileMergeStorageProvider(IOptions <FileMergeStorageOptions> fileMergeStorageOptions, ILogger <FileMergeStorageProvider> logger) : base(logger) { _fileMergeStorageOptions = fileMergeStorageOptions.Value; }