static IResponse CreateResponseWithApiInfo(IDictionary<string, Uri> links) { var apiInfo = new ApiInfo(links, new List<string>(), new List<string>(), "etag", new RateLimit(new Dictionary<string, string>())); var response = Substitute.For<IResponse>(); response.ApiInfo.Returns(apiInfo); return response; }
public static Uri GetLastPageUrl(this ApiInfo info) { Ensure.ArgumentNotNull(info, "info"); return(info.Links.SafeGet("last")); }
public static Uri GetPreviousPageUrl(this ApiInfo info) { Ensure.ArgumentNotNull(info, "info"); return(info.Links.SafeGet("prev")); }
public static Uri GetFirstPageUrl(this ApiInfo info) { Ensure.ArgumentNotNull(info, nameof(info)); return(info.Links.SafeGet("first")); }