Inheritance Hierarchy
DeltaEngine.Platforms TestWithMocksOrVisually
DeltaEngine.Rendering2D.Graphs.Tests RemoveOldestPointsTests
Namespace: DeltaEngine.Rendering2D.Graphs.Tests
Assembly: DeltaEngine.Rendering2D.Graphs.Tests (in DeltaEngine.Rendering2D.Graphs.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The RemoveOldestPointsTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | RemoveOldestPointsTests | Initializes a new instance of the RemoveOldestPointsTests class |
Methods
Name | Description | |
---|---|---|
![]() | AddingPointDoesNotRemoveFirstPointIfUnderTheLimit | |
![]() | AddingPointRemovesFirstPointIfOverTheLimit | |
![]() | AdvanceTimeAndUpdateEntities | (Inherited from TestWithMocksOrVisually.) |
![]() | InitializeResolver | (Inherited from TestWithMocksOrVisually.) |
![]() | RegisterMock T | (Inherited from TestWithMocksOrVisually.) |
![]() | RenderTenPointRandomScrollingGraphOfDollars | |
![]() | 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 RenderTenPointRandomScrollingGraphOfDollars() { new FilledRect(Rectangle.One, Color.Gray) { RenderLayer = int.MinValue }; graph.PercentilePrefix = "$"; Assert.AreEqual(10, graph.MaximumNumberOfPoints); graph.Start<AddValueEverySecond>(); }
[Test, CloseAfterFirstFrame] public void AddingPointDoesNotRemoveFirstPointIfUnderTheLimit() { graph.MaximumNumberOfPoints = 3; line.AddPoint(new Vector2D(1, 0)); line.AddPoint(new Vector2D(2, 0)); Assert.AreEqual(2, line.points.Count); line.AddPoint(new Vector2D(3, 0)); Assert.AreEqual(3, line.points.Count); }
[Test, CloseAfterFirstFrame] public void AddingPointRemovesFirstPointIfOverTheLimit() { graph.MaximumNumberOfPoints = 3; line.AddPoint(new Vector2D(1, 0)); line.AddPoint(new Vector2D(2, 0)); line.AddPoint(new Vector2D(3, 0)); Assert.AreEqual(3, line.points.Count); line.AddPoint(new Vector2D(4, 0)); Assert.AreEqual(3, line.points.Count); }
See Also