public async Task<PageResponse<LastAlbum>> SearchAsync(string albumname, int page = 1, int itemsPerPage = LastFm.DefaultPageLength) { var command = new SearchCommand(Auth, albumname) { Page = page, Count = itemsPerPage, HttpClient = HttpClient }; return await command.ExecuteAsync(); }
public async Task <PageResponse <LastTrack> > SearchAsync(string trackname, int page = 1, int itemsPerPage = LastFm.DefaultPageLength) { var command = new SearchCommand(Auth, trackname) { Page = page, Count = itemsPerPage, HttpClient = HttpClient }; return(await command.ExecuteAsync()); }
public async Task CanSearchOnNotFollowingLine() { var searchFolder = new FakeSearchFolder { SearchInFolder = GitHubFolder.FullName + @"\PureSearch\src\Test\" }; var searchArguments = new FakeSearchArguments { MatchCase = false, NameContains = "Fake", SearchFor = "public class", TextThatFollows = "", TextThatDoesNotFollow = "Contains" }; var searchCommand = new SearchCommand(searchFolder, searchArguments); var context = new FakeApplicationCommandExecutionContext(); await searchCommand.ExecuteAsync(context); Assert.IsTrue(context.Success); Assert.AreEqual(2, context.Messages.Count); }