Ejemplo n.º 1
0
        public void PlayEpisodeSetsPlaylistAndFlags()
        {
            var episode = new Episode
            {
                Id        = 1,
                IsPlayed  = false,
                ChannelId = 1
            };

            PlaylistStore.CreatePodcastList(Arg.Any <Episode[]>()).Returns(new Playlist(episode.InArray()));

            PodcastViewModel.PlayItemCommand.Execute(episode);

            PodcastViewModel.Player.Playlist.Current.Item.Should().Be(episode);
            PodcastViewModel.Player.Received(1).Play();

            episode.IsPlayed.Should().BeTrue();
        }