Inheritance Hierarchy
DeltaEngine.Platforms TestWithMocksOrVisually
DeltaEngine.GameLogic.Tests TimeTriggerTests
Namespace: DeltaEngine.GameLogic.Tests
Assembly: DeltaEngine.GameLogic.Tests (in DeltaEngine.GameLogic.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The TimeTriggerTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
TimeTriggerTests | Initializes a new instance of the TimeTriggerTests class |
Methods
Name | Description | |
---|---|---|
AdvanceTimeAndUpdateEntities | (Inherited from TestWithMocksOrVisually.) | |
InitializeResolver | (Inherited from TestWithMocksOrVisually.) | |
RegisterMock T | (Inherited from TestWithMocksOrVisually.) | |
Resolve T | (Inherited from TestWithMocksOrVisually.) | |
RunAfterFirstFrame | (Inherited from TestWithMocksOrVisually.) | |
RunTestAndDisposeResolverWhenDone | (Inherited from TestWithMocksOrVisually.) | |
TestTimeTrigger |
Properties
Name | Description | |
---|---|---|
IsMockResolver | (Inherited from TestWithMocksOrVisually.) |
Examples
[Test, CloseAfterFirstFrame] public void TestTimeTrigger() { var actor = new MockActor(Vector3D.Zero, 0.0f); var data = new TimeTrigger.Data(Color.Red, Color.Green, 1.0f); actor.Add(data); actor.Start<TimeTrigger>(); actor.Add(Color.Black); Assert.AreEqual(Color.Black, actor.Get<Color>()); Assert.AreEqual(Color.Red, data.FirstColor); Assert.AreEqual(Color.Green, data.SecondColor); Assert.AreEqual(1.0f, data.Interval); AdvanceTimeAndUpdateEntities(1.1f); Assert.AreEqual(Color.Red, actor.Get<Color>()); }
See Also