public QbittorrentTests(ITestOutputHelper output) { _output = output; _logger = new LoggerBuilder <QbittorrentService>().Build(); _qbittorrentSettings = new qbittorrentSettingBuilder().Build(); _qbittorrentService = new QbittorrentService(_logger, _qbittorrentSettings); }
public DownloadServiceTests(ITestOutputHelper output) { _output = output; _logger = new LoggerBuilder <DownloadService>().Build(); _movieService = new MovieServiceBuilder().Build(); _movieMagnetService = new MovieMagServiceBuilder().Build(); _qbittorrentService = new QbittorrentServiceBuilder().Build(); _downloadService = new DownloadService(_logger, _movieService, _movieMagnetService, _qbittorrentService, null); }
public void TestGetTorrentInfoFromRemoteUrl() { var mockQbittorrentSetting = new Mock <IOptionsSnapshot <QbittorrentSettings> >(); QbittorrentSettings setting = new QbittorrentSettings() { WebUrl = "http://192.168.1.22:8080/", Username = "******", Password = "******", }; mockQbittorrentSetting.Setup(ap => ap.Value).Returns(setting); var qbittorrentService = new QbittorrentService(_logger, mockQbittorrentSetting.Object); var hash = "7e8ec6418a9cc070de668a9e13649a97d10e5611"; var torrentInfo = qbittorrentService.GetTorrentInfo(hash); }