public async Task ListArtists() { IRestEndpoint endpoint = _navigator.GetEndpointFromPath("artists"); var response = (CollectionBody)(await endpoint.GetAsync(null)); RestItemData[] arr = response.Items.ToArray(); int firstId = (int)arr[0]["ID"]; Assert.True(firstId > 0); }
private IRestEndpoint GetEndpoint() { _context = new WebApiRequestContext(RequestContext); var navigator = new EndpointNavigator(_context, _config.StartResourceFactory, _config.EndpointServices); return(navigator.GetEndpointFromPath(ResourcePath)); }