/// <summary>
 /// Gets similar artists for an artist.
 /// </summary>
 /// <param name="artist">The artist.</param>
 /// <param name="startIndex">The zero-based start index to fetch items from (e.g. to get the second page of 10 items, pass in 10).</param>
 /// <param name="itemsPerPage">The number of items to fetch.</param>
 /// <returns>
 /// A ListResponse containing Artists or an Error
 /// </returns>
 public Task<ListResponse<Artist>> GetSimilarArtists(Artist artist, int startIndex = MusicClient.DefaultStartIndex, int itemsPerPage = MusicClient.DefaultItemsPerPage)
 {
     var wrapper = new TaskCompletionSource<ListResponse<Artist>>();
     this._musicClient.GetSimilarArtists(result => wrapper.TrySetResult(result), artist, startIndex, itemsPerPage);
     return wrapper.Task;
 }
示例#2
0
 public void TestPlayMixGoesAheadWhenItCan()
 {
     Artist artist = new Artist() { Name = TestName };
     artist.PlayMix();
     Assert.Pass();
 }
 /// <summary>
 /// Gets products by an artist.
 /// </summary>
 /// <param name="artist">The artist.</param>
 /// <param name="category">The category.</param>
 /// <param name="startIndex">The zero-based start index to fetch items from (e.g. to get the second page of 10 items, pass in 10).</param>
 /// <param name="itemsPerPage">The number of items to fetch.</param>
 /// <returns>
 /// A ListResponse containing Products or an Error
 /// </returns>
 public Task<ListResponse<Product>> GetArtistProducts(Artist artist, Category? category = null, int startIndex = MusicClient.DefaultStartIndex, int itemsPerPage = MusicClient.DefaultItemsPerPage)
 {
     var wrapper = new TaskCompletionSource<ListResponse<Product>>();
     this._musicClient.GetArtistProducts(result => wrapper.TrySetResult(result), artist, category, startIndex, itemsPerPage);
     return wrapper.Task;
 }
示例#4
0
 public void TestOverrides()
 {
     Artist artist = new Artist() { Id = TestId, Name = TestName };
     Assert.IsNotNull(artist.GetHashCode(), "Expected a hash code");
     Assert.IsTrue(artist.Equals(new Artist() { Id = TestId }), "Expected equality");
     Assert.IsFalse(artist.Equals(TestId), "Expected inequality");
 }
示例#5
0
 public void TestAristNamePropertyIsRequiredForShow()
 {
     Artist artist = new Artist();
     artist.Show();
 }
示例#6
0
 public void TestAristNamePropertyIsRequiredForPlayMix()
 {
     Artist artist = new Artist();
     artist.PlayMix();
 }
示例#7
0
 public void TestShowGoesAheadWhenItCan()
 {
     Artist artist = new Artist() { Id = TestId };
     artist.Show();
     Assert.Pass();
 }
示例#8
0
        public void TestProperties()
        {
            Artist artist = new Artist() { Id = TestId, Name = TestName };

            Assert.AreEqual(TestId, artist.Id, "Expected the property to persist");
            Assert.AreEqual(TestName, artist.Name, "Expected the property to persist");
        }