VideoTests PlayAndStop 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 PlayAndStop()
Examples

[Test]
public void PlayAndStop()
{
    testVideo.Stop();
    Assert.IsFalse(testVideo.IsPlaying());
    testVideo.Play();
    Assert.IsTrue(testVideo.IsPlaying());
}
[Test]
public void PlayAndStopWithEntitiesRunner()
{
    int startedNumberOfEntities = EntitiesRunner.Current.NumberOfEntities;
    Assert.AreEqual(startedNumberOfEntities, EntitiesRunner.Current.NumberOfEntities);
    testVideo.Stop();
    Assert.AreEqual(startedNumberOfEntities, EntitiesRunner.Current.NumberOfEntities);
    testVideo.Play();
    Assert.AreEqual(startedNumberOfEntities + 1, EntitiesRunner.Current.NumberOfEntities);
    testVideo.Stop();
    Assert.AreEqual(startedNumberOfEntities, EntitiesRunner.Current.NumberOfEntities);
}
See Also