Esempio n. 1
0
        public async void GetRandomArtistAsAdminUserOnSubsonic()
        {
            var artists = await _adminSubsonicClient.GetArtistsAsync();

            Assert.True(artists.Indexes.Any());

            var randomArtistIndexNumber = _random.Next(0, artists.Indexes.Count - 1);
            var randomArtistIndex       = artists.Indexes.ElementAt(randomArtistIndexNumber);

            Assert.True(randomArtistIndex.Artists.Any());

            var randomArtistNumber = _random.Next(0, randomArtistIndex.Artists.Count - 1);
            var randomArtist       = randomArtistIndex.Artists.ElementAt(randomArtistNumber);
            var artist             = await _adminSubsonicClient.GetArtistAsync(randomArtist.Id);

            Assert.True(!string.IsNullOrWhiteSpace(artist.Id));
            Assert.True(!string.IsNullOrWhiteSpace(artist.Name));
        }