BalloonsPop.SoundPlayer.SoundsPlayer.CountSounds C# (CSharp) Method

CountSounds() public method

Returns the amount of registered sounds
public CountSounds ( ) : int
return int
        public int CountSounds()
        {
            return this.sounds.Count;
        }

Usage Example

Example #1
0
        public void SoundsShouldBeRegisteredProperlyToSoundsList()
        {
            SoundPlayer playerMedia = new SoundPlayer();
            SoundsLoader loader = new SoundsLoader();
            SoundsPlayer player = new SoundsPlayer(loader);

            player.RegisterSound("win", playerMedia);

            Assert.AreEqual(1, player.CountSounds());
        }