public void TestIt() { var groove = new GroovesharkClientWrapper(); groove.Connect(); var provider = new AggregateSongProvider(); provider.Providers.Add(new GroovesharkSongProvider(new Lazy<IGroovesharkClient>(() => groove))); provider.Providers.Add(new SpotifySongProvider(new DefaultSpotifyImageProvider())); var player = new AggregateSongPlayer(); player.Players.Add(new GroovesharkSongPlayer(new Lazy<IGroovesharkClient>(() => groove))); var song = provider.GetSongs("NOFX", CancellationToken.None).Result.FirstOrDefault(); if (player.CanPlay(song)) { player.Start(song); } }
public GroovesharkSongProviderTest() { var client = new GroovesharkClientWrapper(); client.Connect(); _provider = new GroovesharkSongProvider(new Lazy<IGroovesharkClient>(() => client)); }