Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensousa committed May 24, 2023
1 parent 2c516ba commit 05edfc9
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,19 @@ internal class LayoutInfoMock(
var isInfinite = false
var reverseLayout = false
var isScrolling = false
var isLoopingAllowed = false
var isLoopingStart = false
var isScrollingToTarget = false
var hasCreatedFirstItem = false
var hasCreatedLastItem = false

init {
every { mock.isLoopingStart }.answers { isLoopingStart }
every { mock.isLoopingAllowed }.answers { isLoopingAllowed }
every { mock.updateLoopingState(any(), any()) }.answers {
isLoopingStart = it.invocation.args[0] as Boolean
isLoopingAllowed = it.invocation.args[1] as Boolean
}
every { mock.isVertical() }.answers { realInstance.isVertical() }
every { mock.isHorizontal() }.answers { realInstance.isHorizontal() }
every { mock.isInfinite() }.answers { isInfinite }
Expand Down

0 comments on commit 05edfc9

Please sign in to comment.