mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-09 13:01:36 +00:00
Merge pull request #1198 from dampir/issue1149
Add ApiOption overloads to methods on IAuthorizationsClient
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
using System.Reactive.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Octokit.Reactive;
|
||||
using Xunit;
|
||||
|
||||
namespace Octokit.Tests.Integration.Reactive
|
||||
{
|
||||
public class ObservableAuthorizationsClientTests
|
||||
{
|
||||
readonly ObservableAuthorizationsClient _authorizationsClient;
|
||||
|
||||
public ObservableAuthorizationsClientTests()
|
||||
{
|
||||
var github = Helper.GetBasicAuthClient();
|
||||
|
||||
_authorizationsClient = new ObservableAuthorizationsClient(github);
|
||||
}
|
||||
|
||||
[IntegrationTest]
|
||||
public async Task CanGetAuthorization()
|
||||
{
|
||||
var authorization = await _authorizationsClient.GetAll();
|
||||
Assert.NotNull(authorization);
|
||||
}
|
||||
|
||||
[IntegrationTest]
|
||||
public async Task CanGetAuthorizationWithApiOptions()
|
||||
{
|
||||
var authorization = await _authorizationsClient.GetAll(ApiOptions.None);
|
||||
Assert.NotNull(authorization);
|
||||
}
|
||||
|
||||
[IntegrationTest]
|
||||
public async Task ReturnsNotEmptyAuthorizationsWithoutStart()
|
||||
{
|
||||
var options = new ApiOptions
|
||||
{
|
||||
PageSize = 5,
|
||||
PageCount = 1
|
||||
};
|
||||
|
||||
var authorizations = await _authorizationsClient.GetAll(options).ToList();
|
||||
Assert.NotEmpty(authorizations);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user