Skip to content

Commit

Permalink
Unskip pagination tests and set page sizes correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
ryangribble committed Aug 8, 2017
1 parent 595e6e2 commit 1fbee42
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,19 @@ public async Task ReturnsCorrectCountOfOutsideCollaboratorsWithAllFilterAndApiOp
var options = new ApiOptions
{
PageCount = 1,
PageSize = 2
PageSize = 1
};

var outsideCollaborators = await _gitHub.Organization
.OutsideCollaborator
.GetAll(Helper.Organization, OrganizationMembersFilter.All, options);

Assert.NotNull(outsideCollaborators);
Assert.Equal(2, outsideCollaborators.Count);
Assert.Equal(1, outsideCollaborators.Count);
}
}

[IntegrationTest(Skip = "It seems this API endpoint does not support pagination as page size/count are not adhered to")]
[IntegrationTest]
public async Task ReturnsCorrectCountOfOutsideCollaboratorsWithAllFilterWithStart()
{
var repoName = Helper.MakeNameWithTimestamp("public-repo");
Expand Down Expand Up @@ -171,6 +171,7 @@ public async Task ReturnsCorrectCountOfOutsideCollaboratorsWithAllFilterWithStar

Assert.Equal(1, firstPageOfOutsideCollaborators.Count);
Assert.Equal(1, secondPageOfOutsideCollaborators.Count);
Assert.NotEqual(firstPageOfOutsideCollaborators[0].Login, secondPageOfOutsideCollaborators[0].Login);
}
}

Expand Down Expand Up @@ -205,7 +206,7 @@ public async Task ReturnsCorrectCountOfOutsideCollaboratorsWithTwoFactorFilterAn
var options = new ApiOptions
{
PageCount = 1,
PageSize = 2
PageSize = 1
};

var outsideCollaborators = await _gitHub.Organization
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,18 +121,18 @@ public async Task ReturnsCorrectCountOfOutsideCollaboratorsWithAllFilterAndApiOp
var options = new ApiOptions
{
PageCount = 1,
PageSize = 2
PageSize = 1
};

var outsideCollaborators = await _client
.GetAll(Helper.Organization, OrganizationMembersFilter.All, options).ToList();

Assert.NotNull(outsideCollaborators);
Assert.Equal(2, outsideCollaborators.Count);
Assert.Equal(1, outsideCollaborators.Count);
}
}

[IntegrationTest(Skip = "It seems this API endpoint does not support pagination as page size/count are not adhered to")]
[IntegrationTest]
public async Task ReturnsCorrectCountOfOutsideCollaboratorsWithAllFilterWithStart()
{
var repoName = Helper.MakeNameWithTimestamp("public-repo");
Expand Down Expand Up @@ -163,6 +163,7 @@ public async Task ReturnsCorrectCountOfOutsideCollaboratorsWithAllFilterWithStar

Assert.Equal(1, firstPageOfOutsideCollaborators.Count);
Assert.Equal(1, secondPageOfOutsideCollaborators.Count);
Assert.NotEqual(firstPageOfOutsideCollaborators[0].Login, secondPageOfOutsideCollaborators[0].Login);
}
}

Expand Down Expand Up @@ -196,7 +197,7 @@ public async Task ReturnsCorrectCountOfOutsideCollaboratorsWithTwoFactorFilterAn
var options = new ApiOptions
{
PageCount = 1,
PageSize = 2
PageSize = 1
};

var outsideCollaborators = await _client
Expand Down

0 comments on commit 1fbee42

Please sign in to comment.