public async void GetAllBeersTest() { // act var result = await _beerManager.GetBeers(); // assert Assert.Null(result.ErrorMessage); Assert.True(result.Data.Any()); }
public async Task <IActionResult> Beers(string query, int?styleId) { var result = await _beerManager.GetBeers(query, styleId); if (result.StatusCode == HttpStatusCode.OK) { return(Ok(result.Data)); } return(BadRequest(result.ErrorMessage)); }