RemoveOldestPointsTests AddingPointRemovesFirstPointIfOverTheLimit Method Delta Engine Documentation

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

public void AddingPointRemovesFirstPointIfOverTheLimit()
Examples

[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