Ejemplo n.º 1
0
        public void getsAndCalculatesAverageWords(IMusicStatService service, string artistName)
        {
            MusicInterpretor sut    = new MusicInterpretor(service);
            Artist           artist = sut.PickArtist(artistName);
            var average             = sut.calculateArtistStats(artist);

            Assert.True(average.AverageWords > 0);
        }
Ejemplo n.º 2
0
        public void GetsTrackAsync(IMusicStatService service, Artist artist)
        {
            GetReleasesByArtistsIDAsyncFactory getReleasesByArtistsIDAsync = new GetReleasesByArtistsIDAsyncFactory(artist, service);
            Command getReleasesByArtistsIDAsync1 = getReleasesByArtistsIDAsync.GetCommand();

            getReleasesByArtistsIDAsync1.ExecuteAsync().Wait();
            GetReleasesByArtistsIDAsync cmd = (GetReleasesByArtistsIDAsync)getReleasesByArtistsIDAsync1;
            var tracks = cmd.ReleaseResults.Releases.SelectMany(r => r.Media[0].Tracks).ToList();

            Assert.True(tracks.Count > 0);
        }
Ejemplo n.º 3
0
        public void FiltersDuplicateTracksFromReleases(IMusicStatService service, string artistName)
        {
            MusicInterpretor sut      = new MusicInterpretor(service);
            var          artist       = sut.PickArtist(artistName);
            var          releases     = new List <Release>(artist.Releases);
            List <Track> uniqueTracks = releases.SelectMany(x => x.Media[0].Tracks).ToList();

            //??

            for (int i = 0; i < releases.Count; i++)
            {
            }

            /*for (int i = 0; i < rawTracks.Count; i++)
             * {
             *  Track verification = uniqueTracks.Find(x => x.Title == rawTracks[i].Title);
             *  Assert.NotNull(verification);
             * }*/
        }