public void InsertValueBeforeIndexRightOfMax() { var colors = new[] { Color.Red, Color.Orange, Color.Yellow }; var colorGraph = new RangeGraph <Color>(colors[0], colors[1]); colorGraph.AddValueBefore(5, colors[2]); Assert.AreEqual(colors, colorGraph.Values); }
public void InsertValuesInTheMiddle() { var points = new[] { Vector2D.Zero, Vector2D.UnitX, Vector2D.UnitY, Vector2D.UnitY, Vector2D.One }; var pointGraph = new RangeGraph <Vector2D>(points[0], points[4]); pointGraph.AddValueAfter(0, points[2]); pointGraph.AddValueAfter(1, points[3]); pointGraph.AddValueBefore(1, points[1]); Assert.AreEqual(points, pointGraph.Values); }
public void InsertValuesInTheMiddle() { var points = new[] { Vector2D.Zero, Vector2D.UnitX, Vector2D.UnitY, Vector2D.UnitY, Vector2D.One }; var pointGraph = new RangeGraph<Vector2D>(points[0], points[4]); pointGraph.AddValueAfter(0, points[2]); pointGraph.AddValueAfter(1, points[3]); pointGraph.AddValueBefore(1, points[1]); Assert.AreEqual(points, pointGraph.Values); }
public void InsertValueBeforeIndexRightOfMax() { var colors = new[] { Color.Red, Color.Orange, Color.Yellow }; var colorGraph = new RangeGraph<Color>(colors[0], colors[1]); colorGraph.AddValueBefore(5, colors[2]); Assert.AreEqual(colors, colorGraph.Values); }
public void AddValueBefore(int index, Color value) { colorIntervals.AddValueBefore(index, value); UpdateDrawingToRanges(); }