public void GetTriangle_WithValidTree_() { //Arrange var request = new TriangleRequest() { Triangle = "1\n8 9\n1 5 9\n4 5 2 3" }; // Act var okResult = _service.CalculateTriangle(request); // Assert Assert.True(okResult.IsValidPath); }
public Triangle CalculateTriangle(TriangleRequest request) { _loggerManager.LogInfo("TriangleController/CalculateTriangle method is called!"); if (request == null) { _loggerManager.LogError("Triangle Request is null!"); throw new Exception("Triangle Request is null!"); } return(_triangleService.CalculateTriangle(request)); }