MusicTests TestIfPlayingMusic Method Delta Engine Documentation

Namespace: DeltaEngine.Multimedia.Tests
Assembly: DeltaEngine.Multimedia.Tests (in DeltaEngine.Multimedia.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void TestIfPlayingMusic()
Examples

[Test, CloseAfterFirstFrame]
public void TestIfPlayingMusic()
{
    var music = ContentLoader.Load<Music>("DefaultMusic");
    music.Play();
    Assert.IsTrue(music.IsPlaying());
    AssertBetween(4.10f, 4.15f, music.DurationInSeconds);
    AdvanceTimeAndUpdateEntities(0.5f);
    AssertBetween(0.25f, 5.0f, music.PositionInSeconds);
}
See Also