-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1198 from dampir/issue1149
Add ApiOption overloads to methods on IAuthorizationsClient
- Loading branch information
Showing
14 changed files
with
312 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
Octokit.Tests.Integration/Reactive/ObservableAuthorizationsClientTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.