Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address issues in #137 #138

Merged
merged 3 commits into from
May 25, 2019
Merged

Address issues in #137 #138

merged 3 commits into from
May 25, 2019

Conversation

rmjcsltd
Copy link
Contributor

No description provided.

Refer to issue #137

The expressions to derive the values for 3 BasePagedList properties
have been changed to be more appropriate and inline with the others in
cases where the current page has no data.

HasPreviousPage when PageNumber > PageCount is now false instead of
true. IsFirstPage when PageCount = 0 is now false instead of true.
FirstItemOnPage and LastItemOnPage when PageCount = 0 or PageNumber >
PageCount are now both 0 instead of being calculated based on page
number and size.

Added test for the totalItemCount parameter in the BasePagedList
constructor being less than 0 - this is an error condition.

This work reverts commit [9cca40b] (the fix for issue #115 (Empty
list causes exception) is now implemented in
X.PagedList.PagedListExtensions.ToPagedList) and [35ca2e5].

Unit tests and documentation comments updated accordingly.
Restructured a few unit tests to remove xUnit2000 (The literal or
constant value ... should be passed as the 'expected' argument ...),
xUnit2004 (Do not use Assert.Equal() to check for boolean conditions)
and xUnit2013 (Do not use Assert.Equal() to check for collection size)
warnings.
@a-gubskiy a-gubskiy merged commit 050462f into dncuug:master May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants