public ActionResult Get([Required] int a, [Required] int b, [Required] int c) { try { Log.Logger.Information($"BEGIN: Get TriangleType with params: a={a}, b={b}, c = {c}"); var result = triangleService.GetTriangleType(a, b, c).ToString(); Log.Logger.Information($"END: Get TriangleType: result={result}"); return(Ok(result)); } catch (Exception ex) { Log.Logger.Error($"FAILED: Get TriangleType failed {ex.Message}"); throw ex; } }
public IHttpActionResult CalculateTheTriangleType(int a, int b, int c) { try { var triangle = new Triangle(a, b, c); var result = _triangleService.GetTriangleType(triangle); return(Ok(result.ToString())); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public TriangleType GetTriangleType_InvalidValues_ReturnError(int a, int b, int c) { return(triangleService.GetTriangleType(a, b, c)); }
public ActionResult <string> Get([FromQuery] int a, [FromQuery] int b, [FromQuery] int c) { return(_triangleService.GetTriangleType(a, b, c)); }