示例#1
0
        public MainMenuGeneratorTests()
        {
            var albumUtils         = new AlbumsUtils(new AlbumsConverter(), GlobalTestInitializer.SpotifyApi);
            var tracksUtils        = new TracksUtils(new TracksConverter(), GlobalTestInitializer.SpotifyApi);
            var exitFunctions      = new ExitFunctions();
            var trackMenuFunctions =
                new TrackMenuFunctions(tracksUtils, exitFunctions, GlobalTestInitializer.SpotifyApi);
            var tracksConverter = new TracksConverter();
            var tracksGenerator = new TracksGenerator(trackMenuFunctions, exitFunctions);
            var albumsGenerator =
                new AlbumsGenerator(
                    new AlbumMenuFunctions(new AlbumsUtils(new AlbumsConverter(), GlobalTestInitializer.SpotifyApi),
                                           tracksConverter, exitFunctions, trackMenuFunctions, GlobalTestInitializer.SpotifyApi),
                    exitFunctions);
            var playlistConverter     = new PlaylistsConverter();
            var playlistUtils         = new PlaylistsUtils(playlistConverter, GlobalTestInitializer.SpotifyApi);
            var playlistMenuFunctions = new PlaylistMenuFunctions(tracksConverter, playlistUtils, trackMenuFunctions,
                                                                  exitFunctions, GlobalTestInitializer.SpotifyApi);
            var artistsUtils = new ArtistsUtils(new ArtistsConverter(), new AlbumsConverter(),
                                                GlobalTestInitializer.SpotifyApi);
            var artistsGenerator = new ArtistsGenerator(exitFunctions,
                                                        new ArtistMenuFunctions(artistsUtils, GlobalTestInitializer.SpotifyApi, tracksGenerator,
                                                                                albumsGenerator, exitFunctions));
            var tracksMenuFunctions    = new TracksMenuFunctions(tracksUtils, tracksGenerator);
            var playlistsMenuFunctions =
                new PlaylistsMenuFunctions(playlistUtils, playlistMenuFunctions, exitFunctions);
            var artistsMenuFunctions = new ArtistsMenuFunctions(artistsUtils, artistsGenerator);
            var albumsMenuFunctions  = new AlbumsMenuFunctions(albumUtils, albumsGenerator);

            var mainMenuFunctions = new MainMenuFunctions(tracksMenuFunctions, playlistsMenuFunctions,
                                                          artistsMenuFunctions, albumsMenuFunctions, exitFunctions);

            _mainMenuGenerator = new MainMenuGenerator(exitFunctions, mainMenuFunctions);
        }
示例#2
0
 public ArtistsMenuFunctions(ArtistsUtils artistsUtils, ArtistsGenerator menuGenerator)
 {
     _artistsUtils     = artistsUtils;
     _artistsGenerator = menuGenerator;
 }