Inheritance Hierarchy
DeltaEngine.Platforms TestWithMocksOrVisually
DeltaEngine.Physics2D.Farseer.Tests PhysicsTests
Namespace: DeltaEngine.Physics2D.Farseer.Tests
Assembly: DeltaEngine.Physics2D.Farseer.Tests (in DeltaEngine.Physics2D.Farseer.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The PhysicsTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
PhysicsTests | Initializes a new instance of the PhysicsTests class |
Methods
Name | Description | |
---|---|---|
AdvanceTimeAndUpdateEntities | (Inherited from TestWithMocksOrVisually.) | |
ChangeGravity | ||
CheckDefaultValues | ||
CheckWorldIsSimulated | ||
CreateBody | ||
CreateEdge | ||
CreateEdgeMultiPoints | ||
CreatePolygon | ||
InitializeResolver | (Inherited from TestWithMocksOrVisually.) | |
RegisterMock T | (Inherited from TestWithMocksOrVisually.) | |
Resolve T | (Inherited from TestWithMocksOrVisually.) | |
RunAfterFirstFrame | (Inherited from TestWithMocksOrVisually.) | |
RunTestAndDisposeResolverWhenDone | (Inherited from TestWithMocksOrVisually.) | |
SetUp |
Properties
Name | Description | |
---|---|---|
IsMockResolver | (Inherited from TestWithMocksOrVisually.) |
Examples
[Test] public void CheckDefaultValues() { Assert.AreEqual(new Vector2D(0.0f, 98.2f), physics.Gravity); Assert.AreEqual(0, physics.Bodies.Count()); }
[Test] public void ChangeGravity() { physics.Gravity = Vector2D.UnitY; Assert.AreEqual(Vector2D.UnitY, physics.Gravity); }
[Test] public void CreateBody() { VerifyBodyIsCreated(physics.CreateRectangle(Size.One)); }
[Test] public void CreateEdge() { VerifyBodyIsCreated(physics.CreateEdge(Vector2D.Zero, Vector2D.One)); }
[Test] public void CreateEdgeMultiPoints() { VerifyBodyIsCreated(physics.CreateEdge(Vector2Ds)); }
[Test] public void CreatePolygon() { VerifyBodyIsCreated(physics.CreatePolygon(Vector2Ds)); }
[Test] public void CheckWorldIsSimulated() { var body = physics.CreateRectangle(Size.One); AdvanceTimeAndUpdateEntities(); Assert.AreNotEqual(Vector2D.Zero, body.Position); }
See Also