Ejemplo n.º 1
0
        public void SkipToNextTrackFailNotPlaying()
        {
            SpotifyPlayer          player  = CreateLoggedInPlayer();
            Mock <ISpotifyWrapper> wrapper = Mock.Get(player.Spotify);

            player.SkipToNextTrack();

            Assert.AreEqual(PlayerState.Stopped, player.State);
        }
Ejemplo n.º 2
0
        public void SkipToNextTrackSucceed()
        {
            SpotifyPlayer          player  = CreatePlayingSpotifyPlayer();
            Mock <ISpotifyWrapper> wrapper = Mock.Get(player.Spotify);

            wrapper.Setup(p => p.SkipToNextTrack());

            player.SkipToNextTrack();

            wrapper.Verify(p => p.SkipToNextTrack(), Times.Exactly(1));
            Assert.AreEqual(PlayerState.Playing, player.State);
            StopPlayer(player);
        }