public void TestGetTriangleByCoords() { var controller = new TrianglesController(); var result = controller.GetTriangleByCoords(60, 50, 50, 50, 60, 60); Assert.AreEqual(result, "F12"); }
public void TestGetTriangleByCoordsOdd() { var controller = new TrianglesController(); var result = controller.GetTriangleByCoords(20, 40, 20, 30, 30, 40); Assert.AreEqual(result, "D5"); }
public void GetByVertices(string input, string expected) { // Arrange TrianglesController controller = new TrianglesController(); // Act string result = controller.Vertices(input); // Assert Assert.AreEqual(expected, result, input); }
public void Get() { // Arrange TrianglesController controller = new TrianglesController(); // Act IEnumerable <string> result = controller.Get(); // Assert Assert.IsNotNull(result); Assert.AreEqual(72, result.Count()); Assert.AreEqual("{\"Row\":1,\"Col\":1,\"Location\":\"A1\",\"Vertices\":[\"0, 0\",\"10, 10\",\"0, 10\"]}", result.ElementAt(0)); }
public void TestGetTriangleCoordinatesByRowAndColumnEven() { var controller = new TrianglesController(); var result = controller.GetCoordinates("D", 6); Assert.AreEqual(result.V1x, 30); Assert.AreEqual(result.V1y, 30); Assert.AreEqual(result.V2x, 20); Assert.AreEqual(result.V2y, 30); Assert.AreEqual(result.V3x, 30); Assert.AreEqual(result.V3y, 40); }
public TrianglesControllerTest() { Mock <ILogger <TrianglesController> > mockLogger = new Mock <ILogger <TrianglesController> >(); _triangleController = new TrianglesController(_mockTriangleService.Object, mockLogger.Object); }
public TrianglesControllerTests() { _controller = new TrianglesController(); }
public void Setup() { trianglesController = new TrianglesController(new TriangleResolver()); }