public async void EnsureAsyncGetArtistProductsReturnsItems() { // Only test happy path, as the MusicClient tests cover the unhappy path IMusicClientAsync client = new MusicClientAsync("test", "test", "gb", new SuccessfulMockApiRequestHandler()); this.ProductResponse(await client.GetArtistProducts("test")); this.ProductResponse(await client.GetArtistProducts(new Artist() { Id = "test" })); }
public async void EnsureAsyncGetTopProductsReturnsItems() { // Only test happy path, as the MusicClient tests cover the unhappy path IMusicClientAsync client = new MusicClientAsync("test", "test", "gb", new MockApiRequestHandler(Resources.product_parse_tests)); ListResponse<Product> result = await client.GetTopProducts(Category.Album); Assert.Greater(result.Result.Count, 0, "Expected more than 0 results"); }
public async void EnsureAsyncGetArtistSearchSuggestionsReturnsItems() { // Only test happy path, as the MusicClient tests cover the unhappy path IMusicClientAsync client = new MusicClientAsync("test", "test", "gb", new MockApiRequestHandler(Resources.search_suggestions)); ListResponse<string> result = await client.GetArtistSearchSuggestions("test"); Assert.Greater(result.Result.Count, 0, "Expected more than 0 results"); }
public async void EnsureAsyncSearchReturnsItems() { // Only test happy path, as the MusicClient tests cover the unhappy path IMusicClientAsync client = new MusicClientAsync("test", "test", "gb", new SuccessfulMockApiRequestHandler()); ListResponse<MusicItem> result = await client.Search("test"); Assert.Greater(result.Result.Count, 0, "Expected more than 0 results"); }
public async void EnsureAsyncGetSimilarArtistsReturnsItems() { // Only test happy path, as the MusicClient tests cover the unhappy path IMusicClientAsync client = new MusicClientAsync("test", "test", "gb", new SuccessfulMockApiRequestHandler()); ListResponse<Artist> result = await client.GetSimilarArtists("test"); Assert.Greater(result.Result.Count, 0, "Expected more than 0 results"); result = await client.GetSimilarArtists(new Artist() { Id = "test" }); Assert.Greater(result.Result.Count, 0, "Expected more than 0 results"); }
public async void EnsureAsyncGetNewReleasesReturnsItems() { // Only test happy path, as the MusicClient tests cover the unhappy path IMusicClientAsync client = new MusicClientAsync("test", "test", "gb", new SuccessfulMockApiRequestHandler()); ListResponse<Product> result = await client.GetNewReleases(Category.Album); Assert.Greater(result.Result.Count, 0, "Expected more than 0 results"); result = await client.GetNewReleases(Category.Album, 0, 10); Assert.Greater(result.Result.Count, 0, "Expected more than 0 results"); }
public async void EnsureAsyncGetArtistsAroundLocationReturnsItems() { // Only test happy path, as the MusicClient tests cover the unhappy path IMusicClientAsync client = new MusicClientAsync("test", "test", "gb", new MockApiRequestHandler(Resources.search_artists)); ListResponse<Artist> result = await client.GetArtistsAroundLocation(51.45534, -2.59239); Assert.Greater(result.Result.Count, 0, "Expected more than 0 results"); }
public async void EnsureAsyncGetMixesReturnsItems() { // Only test happy path, as the MusicClient tests cover the unhappy path IMusicClientAsync client = new MusicClientAsync("test", "test", "gb", new MockApiRequestHandler(Resources.mixes)); ListResponse<Mix> result = await client.GetMixes("test"); Assert.Greater(result.Result.Count, 0, "Expected more than 0 results"); result = await client.GetMixes(new MixGroup() { Id = "test" }); Assert.Greater(result.Result.Count, 0, "Expected more than 0 results"); }
public async void EnsureAsyncGetTopArtistsForGenreReturnsItems() { // Only test happy path, as the MusicClient tests cover the unhappy path IMusicClientAsync client = new MusicClientAsync("test", "test", "gb", new MockApiRequestHandler(Resources.top_artists_genre)); ListResponse<Artist> result = await client.GetTopArtistsForGenre("test"); Assert.Greater(result.Result.Count, 0, "Expected more than 0 results"); result = await client.GetTopArtistsForGenre(new Genre() { Id = "test" }); Assert.Greater(result.Result.Count, 0, "Expected more than 0 results"); }