Ejemplo n.º 1
0
        public void StopMusicFailNotPlaying()
        {
            SpotifyPlayer player = CreateInitializedPlayer();

            player.StopMusic();

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

            wrapper.Setup(p => p.LogOut());
            wrapper.Setup(p => p.StopMusic());

            player.StopMusic();
        }
Ejemplo n.º 3
0
        public void StopMusicSucceed()
        {
            SpotifyPlayer          player  = CreatePlayingSpotifyPlayer();
            Mock <ISpotifyWrapper> wrapper = Mock.Get(player.Spotify);

            wrapper.Setup(p => p.LogOut());
            wrapper.Setup(p => p.StopMusic());

            player.StopMusic();

            wrapper.Verify(p => p.StopMusic(), Times.Exactly(1));
            wrapper.Verify(p => p.LogOut(), Times.Exactly(1));
            Assert.AreEqual(PlayerState.Stopped, player.State);
        }