Пример #1
0
            public async Task CallsAudioPlayerPause()
            {
                var audioPlayerCallback = Substitute.For<IMediaPlayerCallback>();

                using (Library library = new LibraryBuilder().WithPlaylist().WithAudioPlayer(audioPlayerCallback).Build())
                {
                    Song song = Helpers.SetupSongMock();

                    library.AddSongToPlaylist(song);

                    Guid token = library.LocalAccessControl.RegisterLocalAccessToken();

                    await library.PlaySongAsync(0, token);

                    await library.PauseSongAsync(token);
                }

                audioPlayerCallback.Received(1).PauseAsync();
            }