コード例 #1
0
ファイル: SpotifyPlayerTests.cs プロジェクト: davidov541/SAMI
        public void SkipToNextTrackFailNotPlaying()
        {
            SpotifyPlayer          player  = CreateLoggedInPlayer();
            Mock <ISpotifyWrapper> wrapper = Mock.Get(player.Spotify);

            player.SkipToNextTrack();

            Assert.AreEqual(PlayerState.Stopped, player.State);
        }
コード例 #2
0
ファイル: SpotifyPlayerTests.cs プロジェクト: davidov541/SAMI
        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);
        }