public PlexSyncTests() { _plexApi = Substitute.For <IPlexApi>(); _plexService = Substitute.For <IPlexService>(); _processorProvider = Substitute.For <IProcessorProvider>(); _completionService = Substitute.For <ICompletionService>(); _unitOfWork = Substitute.For <IUnitOfWork>(); var logger = Substitute.For <ILogger <PlexSync> >(); var plexSettings = new PlexSettingsBuilder().Build(); var options = Substitute.For <IOptionsSnapshot <PlexSettings> >(); options.Value.Returns(plexSettings); _underTest = new PlexSync(_plexApi, _plexService, _completionService, _processorProvider, _unitOfWork, options, logger); }
public static async Task ExecutePlex(PerformContext ctx, string plexKey, string plexUrl, string plexClientSecret, string traktKey, string traktClientId, string traktClientSecret, string emailApiKey, string emailSendTo) { var plexSync = new PlexSync(plexKey, plexUrl, plexClientSecret, traktKey, traktClientId, traktClientSecret, emailApiKey, emailSendTo); await plexSync.SyncToPlex(); }