Change ReadOnlyPagedCollection to accept a Func

This is technically better because the old way was actually losing
accepts header and parameters.
This commit is contained in:
Haacked
2013-10-15 16:12:58 -07:00
parent a98bc84530
commit 998f5f54fd
3 changed files with 14 additions and 9 deletions
@@ -27,7 +27,9 @@ namespace Octokit.Tests.Models
};
var connection = Substitute.For<IConnection>();
connection.GetAsync<List<object>>(nextPageUrl, null, null).Returns(nextPageResponse);
var pagedCollection = new ReadOnlyPagedCollection<object>(response, connection);
var pagedCollection = new ReadOnlyPagedCollection<object>(
response,
nextPageUri => connection.GetAsync<List<object>>(nextPageUrl, null, null));
var nextPage = await pagedCollection.GetNextPage();