public async Task GetArtistShouldReturnArtistObject() { var result = await _service.GetMashup(ArtistId); Assert.Equal("Artist name", result.Name); Assert.Equal("Artist description", result.Description); Assert.Equal(ArtistId, result.Mbid); Assert.Single(result.Albums); Assert.Equal("Album name", result.Albums.First().Title); Assert.Equal("https://www.en.bild.se/", result.Albums.First().Image); }
public async Task <IActionResult> Get(string id) { try { var response = await _mashupService.GetMashup(id); return(Ok(response)); } catch (ArtistDoesNotExistException) { return(NotFound()); } catch (Exception) { return(StatusCode(500)); } }