Provides methods for playing a song.
Наследование: AudioPlayer
Пример #1
0
        public void Volume_NoSongLoadedAndVolumeIsSet_ReturnsSettedVolume()
        {
            var audioPlayer = new LocalAudioPlayer { Volume = 0.5f };

            Assert.AreEqual(0.5f, audioPlayer.Volume);
        }
Пример #2
0
        public void TotalTime_NoSongLoaded_ReturnsTimeSpanZero()
        {
            var audioPlayer = new LocalAudioPlayer();

            Assert.AreEqual(TimeSpan.Zero, audioPlayer.TotalTime);
        }
Пример #3
0
        public void Load_ArgumentIsNull_ThrowsArgumentNullException()
        {
            var audioPlayer = new LocalAudioPlayer();

            Assert.Throws<ArgumentNullException>(() => audioPlayer.Load(null));
        }
Пример #4
0
        public void PlaybackState_NoSongLoaded_ReturnsNone()
        {
            var audioPlayer = new LocalAudioPlayer();

            Assert.AreEqual(AudioPlayerState.None, audioPlayer.PlaybackState);
        }
Пример #5
0
        public void CurrentTime_NoSongLoaded_ReturnsTimeSpandZero()
        {
            var audioPlayer = new LocalAudioPlayer();

            Assert.AreEqual(TimeSpan.Zero, audioPlayer.CurrentTime);
        }