本文整理汇总了C#中Octokit.GistsClient.GetAllStarred方法的典型用法代码示例。如果您正苦于以下问题:C# GistsClient.GetAllStarred方法的具体用法?C# GistsClient.GetAllStarred怎么用?C# GistsClient.GetAllStarred使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Octokit.GistsClient
的用法示例。
在下文中一共展示了GistsClient.GetAllStarred方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RequestsCorrectGetAllStarredUrl
public void RequestsCorrectGetAllStarredUrl()
{
var connection = Substitute.For<IApiConnection>();
var client = new GistsClient(connection);
client.GetAllStarred();
connection.Received().GetAll<Gist>(Arg.Is<Uri>(u => u.ToString() == "gists/starred"));
}
示例2: RequestsCorrectGetAllStarredWithSinceUrl
public void RequestsCorrectGetAllStarredWithSinceUrl()
{
var connection = Substitute.For<IApiConnection>();
var client = new GistsClient(connection);
DateTimeOffset since = DateTimeOffset.Now;
client.GetAllStarred(since);
connection.Received().GetAll<Gist>(Arg.Is<Uri>(u => u.ToString() == "gists/starred"),
Arg.Is<IDictionary<string, string>>(x => x.ContainsKey("since")));
}
示例3: EnsureNonNullArguments
public async Task EnsureNonNullArguments()
{
var connection = Substitute.For<IApiConnection>();
var client = new GistsClient(connection);
await Assert.ThrowsAsync<ArgumentNullException>(() => client.GetAllStarred(null));
await Assert.ThrowsAsync<ArgumentNullException>(() => client.GetAllStarred(DateTimeOffset.Now, null));
}
示例4: RequestsCorrectGetAllStarredWithSinceUrlAndApiOptions
public void RequestsCorrectGetAllStarredWithSinceUrlAndApiOptions()
{
var connection = Substitute.For<IApiConnection>();
var client = new GistsClient(connection);
var options = new ApiOptions
{
PageSize = 1,
PageCount = 1,
StartPage = 1
};
DateTimeOffset since = DateTimeOffset.Now;
client.GetAllStarred(since, options);
connection.Received().GetAll<Gist>(Arg.Is<Uri>(u => u.ToString() == "gists/starred"),
DictionaryWithSince, options);
}
示例5: RequestsCorrectGetAllStarredWithSinceUrl
public void RequestsCorrectGetAllStarredWithSinceUrl()
{
var connection = Substitute.For<IApiConnection>();
var client = new GistsClient(connection);
DateTimeOffset since = DateTimeOffset.Now;
client.GetAllStarred(since);
connection.Received().GetAll<Gist>(Arg.Is<Uri>(u => u.ToString() == "gists/starred"),
DictionaryWithSince, Args.ApiOptions);
}
示例6: RequestsCorrectGetAllStarredUrlWithApiOptions
public void RequestsCorrectGetAllStarredUrlWithApiOptions()
{
var connection = Substitute.For<IApiConnection>();
var client = new GistsClient(connection);
var options = new ApiOptions
{
PageSize = 1,
PageCount = 1,
StartPage = 1
};
client.GetAllStarred(options);
connection.Received().GetAll<Gist>(Arg.Is<Uri>(u => u.ToString() == "gists/starred"), options);
}