Namespace: DeltaEngine.Multimedia.Tests
Assembly: DeltaEngine.Multimedia.Tests (in DeltaEngine.Multimedia.Tests.dll) Version: 1.1.1.0 (1.1.1)
Assembly: DeltaEngine.Multimedia.Tests (in DeltaEngine.Multimedia.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Examples
[Test] public void DisposeSoundInstance() { var sound = ContentLoader.Load<Sound>("DefaultSound"); var instance = sound.CreateSoundInstance(); Assert.AreEqual(1, sound.NumberOfInstances); Assert.AreEqual(0, sound.NumberOfPlayingInstances); instance.Dispose(); Assert.AreEqual(0, sound.NumberOfInstances); Assert.AreEqual(0, sound.NumberOfPlayingInstances); }
[Test] public void DisposeSoundInstancesFromSoundClass() { var sound = ContentLoader.Load<Sound>("DefaultSound"); sound.CreateSoundInstance(); sound.Play(); Assert.AreEqual(2, sound.NumberOfInstances); Assert.AreEqual(1, sound.NumberOfPlayingInstances); sound.Dispose(); Assert.AreEqual(0, sound.NumberOfInstances); Assert.AreEqual(0, sound.NumberOfPlayingInstances); }
See Also