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

Make Previous/Next page more mockable #171

Open
strideynet opened this issue Aug 22, 2021 · 1 comment
Open

Make Previous/Next page more mockable #171

strideynet opened this issue Aug 22, 2021 · 1 comment

Comments

@strideynet
Copy link
Collaborator

As it stands, the pageable interface is not exported, which makes life more difficult mocking this.

@strideynet strideynet added this to the V2.1 milestone Aug 22, 2021
@strideynet strideynet removed this from the V2.1 milestone Jun 26, 2022
@ebreiner
Copy link

Hey there @strideynet! I ran into this while implementing some tests for my current project. Because the pageable interface is not exported but exposed in NextPage(ctx context.Context, p pageable) error, mocking is pretty tough and gets me into weird places (at least with my current go skills, learning it right now). Is there any not so obvious reason for the interface not being exported? I took a quick look, exported it and tested it in my current project. Worked like a charm. Because of this I and the low effort I already opened a PR for this in #260.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants