public void TestThatCreateLineCreatesDiagonalLine(int length) { LineTool lineTool = new LineTool(); var line = lineTool.CreateLine(new Coordinates(0, 0), new Coordinates(length - 1, length - 1), 1); Assert.Equal(length, line.Length); for (int i = 0; i < length; i++) { Assert.Contains(new Coordinates(i, i), line); } }
public void TestThatCreateLineCreatesDiagonalLine(int length) { LineTool lineTool = new LineTool(); System.Collections.Generic.IEnumerable <Coordinates> line = lineTool.CreateLine(new Coordinates(0, 0), new Coordinates(length - 1, length - 1), 1); Assert.Equal(length, line.Count()); for (int i = 0; i < length; i++) { Assert.Contains(new Coordinates(i, i), line); } }