Пример #1
0
        public void StopMusicFailNotPlaying()
        {
            SpotifyPlayer player = CreateInitializedPlayer();

            player.StopMusic();

            Assert.AreEqual(PlayerState.Stopped, player.State);
        }
Пример #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();
        }
Пример #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);
        }