Пример #1
0
        public void GetAllCountriesFromAlbums()
        {
            AlbumsCollection collection = new AlbumsCollection();

            collection.CreateAlbums();

            foreach (var country in collection.AllCountries)
            {
                _testOutputHelper.WriteLine(country);
            }
        }
Пример #2
0
        public void GetAllYearsFromAlbums()
        {
            AlbumsCollection collection = new AlbumsCollection();

            collection.CreateAlbums();

            foreach (var year in collection.AllYears)
            {
                _testOutputHelper.WriteLine(year.ToString());
            }
        }
Пример #3
0
        public void GetAllStylesFromAlbums()
        {
            AlbumsCollection collection = new AlbumsCollection();

            collection.CreateAlbums();

            foreach (var style in collection.AllStyles)
            {
                _testOutputHelper.WriteLine(style);
            }
        }
Пример #4
0
        public void GetAllAlbumsWithArtists()
        {
            AlbumsCollection collection = new AlbumsCollection();

            collection.CreateAlbums();

            var albumName = collection.albums;

            foreach (var el in albumName)
            {
                _testOutputHelper.WriteLine($"Album: {el.Name}, Artist: {el.Artist.Name}");
            }
        }
Пример #5
0
        public void GetSpecifiedAlbumNamesByStyle()
        {
            AlbumsCollection collection = new AlbumsCollection();
            string           style      = "Proggresive Rock";

            collection.CreateAlbums();

            var specifiedAlbum = collection.albums.Where(x => x.Style == style).Select(x => x.Name);

            foreach (var el in specifiedAlbum)
            {
                _testOutputHelper.WriteLine(el);
            }
        }
        public void FiltersOcurrenceCounterTest()
        {
            var albumsCollection = new AlbumsCollection();

            albumsCollection.CreateAlbums();

            foreach (var el in albumsCollection.allFilters.Genres)
            {
                if (!albumsCollection.allFilters.genresOcurrences.ContainsKey(el))
                {
                    albumsCollection.allFilters.genresOcurrences.Add(el, 1);
                }
                else
                {
                    albumsCollection.allFilters.genresOcurrences[el] += 1;
                }
            }

            foreach (var(key, value) in albumsCollection.allFilters.genresOcurrences)
            {
                _testOutputHelper.WriteLine($"{key} {value}");
            }
        }