Provides methods for playing a song.
Inheritance: AudioPlayer
Esempio n. 1
0
        public void Volume_NoSongLoadedAndVolumeIsSet_ReturnsSettedVolume()
        {
            var audioPlayer = new LocalAudioPlayer { Volume = 0.5f };

            Assert.AreEqual(0.5f, audioPlayer.Volume);
        }
Esempio n. 2
0
        public void TotalTime_NoSongLoaded_ReturnsTimeSpanZero()
        {
            var audioPlayer = new LocalAudioPlayer();

            Assert.AreEqual(TimeSpan.Zero, audioPlayer.TotalTime);
        }
Esempio n. 3
0
        public void Load_ArgumentIsNull_ThrowsArgumentNullException()
        {
            var audioPlayer = new LocalAudioPlayer();

            Assert.Throws<ArgumentNullException>(() => audioPlayer.Load(null));
        }
Esempio n. 4
0
        public void PlaybackState_NoSongLoaded_ReturnsNone()
        {
            var audioPlayer = new LocalAudioPlayer();

            Assert.AreEqual(AudioPlayerState.None, audioPlayer.PlaybackState);
        }
Esempio n. 5
0
        public void CurrentTime_NoSongLoaded_ReturnsTimeSpandZero()
        {
            var audioPlayer = new LocalAudioPlayer();

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