public async void GetBeerByIdTest(string id, bool beerIsExists) { // act var result = await _beerManager.GetBeerById(id); // assert Assert.Equal(result.Data != null, beerIsExists); }
public async Task <IActionResult> Beer([Required] string id) { var result = await _beerManager.GetBeerById(id); if (result.StatusCode == HttpStatusCode.OK) { return(Ok(result.Data)); } return(BadRequest(result.ErrorMessage)); }