public async Task NonExistentScalarField_Get_404() { HttpResponseMessage response = await HttpClient.GetAsync("/artists/123/ohdear"); ResponseAssert.Status(response, HttpStatusCode.NotFound); string json = await response.Content.ReadAsStringAsync(); dynamic obj = JsonConvert.DeserializeObject(json); Assert.NotNull(obj); Assert.Equal("field_not_found", (string)obj.error); }
public async Task NonExistentItemID_Get_404() { HttpResponseMessage response = await HttpClient.GetAsync("/artists/321"); ResponseAssert.Status(response, HttpStatusCode.NotFound); string json = await response.Content.ReadAsStringAsync(); dynamic obj = JsonConvert.DeserializeObject(json); Assert.NotNull(obj); Assert.Equal("item_with_identifier_not_found", (string)obj.error); }