spotify icon indicating copy to clipboard operation
spotify copied to clipboard

Make Previous/Next page more mockable

Open strideynet opened this issue 4 years ago • 1 comments

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

strideynet avatar Aug 22 '21 11:08 strideynet

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.

ebreiner avatar May 20 '24 10:05 ebreiner