-
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 #1190 from dampir/issue1182
Add ApiOption overloads to methods on IUserEmailsClient
- Loading branch information
Showing
9 changed files
with
146 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,15 +6,42 @@ namespace Octokit.Tests.Integration.Clients | |
{ | ||
public class UserEmailsClientTests | ||
{ | ||
private readonly IUserEmailsClient _emailClient; | ||
|
||
public UserEmailsClientTests() | ||
{ | ||
var github = Helper.GetAuthenticatedClient(); | ||
_emailClient = github.User.Email; | ||
} | ||
|
||
[IntegrationTest] | ||
public async Task CanGetEmail() | ||
{ | ||
var github = Helper.GetAuthenticatedClient(); | ||
var emails = await _emailClient.GetAll(); | ||
Assert.NotEmpty(emails); | ||
} | ||
|
||
var emails = await github.User.Email.GetAll(); | ||
[IntegrationTest] | ||
public async Task CanGetEmailWithApiOptions() | ||
{ | ||
var emails = await _emailClient.GetAll(ApiOptions.None); | ||
Assert.NotEmpty(emails); | ||
} | ||
|
||
[IntegrationTest] | ||
public async Task ReturnsCorrectCountOfEmailsWithoutStart() | ||
{ | ||
var options = new ApiOptions | ||
{ | ||
PageSize = 5, | ||
PageCount = 1 | ||
}; | ||
|
||
var emails = await _emailClient.GetAll(options); | ||
|
||
Assert.NotEmpty(emails); | ||
} | ||
|
||
const string testEmailAddress = "[email protected]"; | ||
|
||
[IntegrationTest(Skip = "this isn't passing in CI - i hate past me right now")] | ||
|
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
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 |
---|---|---|
|
@@ -58,5 +58,4 @@ internal string DebuggerDisplay | |
} | ||
} | ||
} | ||
|
||
} |