private static void TestAddSongRequest(IReadOnlyList <string> args) { var httpLink = ParseIntputLink(args); var settings = TestSettings.MockSettings(httpLink); using var scrapper = HttpWebScrapperFactory.Create(settings, Logger); scrapper.OpenUrl(); var userData = UserData.Create("TestUserId", "TestUserName"); var number = SongRequestNumber.All; var request = SongRequestModel.CreateNew(userData, TestConfig.SongLink, number); request = request.AutoApprove(settings.AutoApproveReason); request = request.StartProcessing(); var result = scrapper.Process(request); if (result.IsSuccess) { Logger.Info("Song request processed successfully!"); } else { Logger.Error($"Failed to process song request: {result.Description}"); } }
private static void TestSkipSongRequest(IReadOnlyList <string> args) { HttpLink httpLink = ParseIntputLink(args); var settings = TestSettings.MockSettings(httpLink); using var scrapper = HttpWebScrapperFactory.Create(settings, Logger); scrapper.OpenUrl(); var result = scrapper.Skip(shouldSkipAll: true); if (result.IsSuccess) { Logger.Info("Song requests were skipped successfully!"); } else { Logger.Error($"Failed to skip song requests: {result.Description}"); } }