本文整理匯總了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);
}