public void GetAllTimeBooties_ReturnsGetTopBootiesResponse() { var expectedUsername = "******"; var minimumPointAmount = 1000; var bootiesResponse = _seClient.GetAllTimePoints().GetAwaiter().GetResult(); var maxPoints = bootiesResponse.Users.Max(bu => bu.Points); var blazdnconfuzdPoints = bootiesResponse.Users.FirstOrDefault(bu => bu.Username.Contains(expectedUsername))?.Points; Assert.IsTrue(maxPoints == blazdnconfuzdPoints, $"The max points: {maxPoints} did not match the expected value: {blazdnconfuzdPoints} "); Assert.IsTrue(bootiesResponse.Users.FirstOrDefault(bu => bu.Username.Contains(expectedUsername))?.Points > minimumPointAmount, $"The user's points did not meet the minimum expected value: {minimumPointAmount} "); }
public async Task <ActionResult> GetTopAlltimePoints() { GetTopBootiesResponse topAllTimePoints; try { topAllTimePoints = await _seClient.GetAllTimePoints(); } catch (Exception e) { return(StatusCode((int)HttpStatusCode.InternalServerError, Json(e))); } return(StatusCode((int)HttpStatusCode.OK, Json(topAllTimePoints))); }