added a couple of tests

This commit is contained in:
Brendan Forster
2015-03-06 09:39:22 +09:30
parent 96f58e341d
commit 8946b09b04
@@ -615,6 +615,62 @@ public class RepositoriesClientTests
}
}
public class TheGetAllForCurrentMethod
{
[IntegrationTest]
public async Task CanRetrieveResults()
{
var github = Helper.GetAuthenticatedClient();
var repositories = await github.Repository.GetAllForCurrent();
Assert.NotEmpty(repositories);
}
[IntegrationTest]
public async Task CanSortResults()
{
var github = Helper.GetAuthenticatedClient();
var request = new RepositoryRequest
{
Sort = RepositorySort.Created
};
var reposByCreated = await github.Repository.GetAllForCurrent(request);
request.Sort = RepositorySort.FullName;
var reposByFullName = await github.Repository.GetAllForCurrent(request);
Assert.NotEmpty(reposByCreated);
Assert.NotEmpty(reposByFullName);
Assert.NotEqual(reposByCreated, reposByFullName);
}
[IntegrationTest]
public async Task CanChangeSortDirection()
{
var github = Helper.GetAuthenticatedClient();
var request = new RepositoryRequest
{
Direction = SortDirection.Ascending
};
var reposAscending = await github.Repository.GetAllForCurrent(request);
request.Direction = SortDirection.Ascending;
var reposDescending = await github.Repository.GetAllForCurrent(request);
Assert.NotEmpty(reposAscending);
Assert.NotEmpty(reposDescending);
Assert.NotEqual(reposAscending, reposDescending);
}
}
public class TheGetAllLanguagesMethod
{
[IntegrationTest]