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