Skip to content

Commit

Permalink
#169 Setup ContributionSummary tests and fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
01binary committed Aug 20, 2017
1 parent 40e7ed0 commit 6b4b5b3
Show file tree
Hide file tree
Showing 27 changed files with 24,676 additions and 2 deletions.
6 changes: 6 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"projects": [
"src",
"tests"
]
}
4 changes: 2 additions & 2 deletions src/Api/Assemblers/ContributionAssembler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public ContributionSummary GetContributionSummary(IQueryable<Article> articles,
/// </summary>
/// <param name="maxArticles">Max. articles per page.</param>
/// <returns>A self-reference for chaining.</returns>
private ContributionSummary Paginate(ContributionSummary summary, int maxArticles)
private ContributionSummary Paginate(ContributionSummary summary, int max)
{
string monthName = null;
int articleCount = 0;
Expand All @@ -125,7 +125,7 @@ private ContributionSummary Paginate(ContributionSummary summary, int maxArticle

articleCount++;

if (articleCount == maxArticles)
if (articleCount == max)
{
summary.Pages.Add(new PageSummary
{
Expand Down
Loading

0 comments on commit 6b4b5b3

Please sign in to comment.