public void CanFindVertexesForD6() { const char row = 'D'; const int column = 6; var expectedVerticies = new[] { new Vertex { X = 20, Y = 30 }, new Vertex { X = 30, Y = 30 }, new Vertex { X = 30, Y = 40 }, }; HashSet <Vertex> expectedResponse = new HashSet <Vertex>(expectedVerticies); var actualVertexes = TriangleLogic.FindVerticiesOfTriangle(row, column); HashSet <Vertex> actualResponse = new HashSet <Vertex>(actualVertexes); Assert.IsTrue(expectedResponse.SetEquals(actualResponse)); }
public void CanFindVertexesForA1() { const char row = 'A'; const int column = 1; HashSet <Vertex> expectedResponse = new HashSet <Vertex>(new[] { new Vertex { X = 0, Y = 0 }, new Vertex { X = 10, Y = 10 }, new Vertex { X = 0, Y = 10 }, }); HashSet <Vertex> actualResponse = new HashSet <Vertex>(TriangleLogic.FindVerticiesOfTriangle(row, column)); Assert.IsTrue(expectedResponse.SetEquals(actualResponse)); }