public void StopMusicFailNotPlaying() { SpotifyPlayer player = CreateInitializedPlayer(); player.StopMusic(); Assert.AreEqual(PlayerState.Stopped, player.State); }
private void StopPlayer(SpotifyPlayer player) { Mock <ISpotifyWrapper> wrapper = Mock.Get(player.Spotify); wrapper.Setup(p => p.LogOut()); wrapper.Setup(p => p.StopMusic()); player.StopMusic(); }
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); }