in above implementation i lost of my `whenever` or...
# spek
r
in above implementation i lost of my
whenever
or
on
block. because
Copy code
repository.fetchWeather() willReturnSingle weatherData // this weatherData from fixture
                
                presenter.fetchWeather()
should be done in whenever or on block
a
1. What is
whenever
? There is a change you're calling Kotlin Mockito function by mistake 1. Highly recommend wrap `val`s into
memoized {}
to properly reset them for each test 1. What is
then
? Also looks like Kotlin Mockito
r
That only alias for
on
and
it
which I created. Those are not Mockito property. That's make structure more elegant. given { whenever { then { } } } instead of given { on { it { } } } https://github.com/spekframework/spek-android-example/blob/c8826153b49f991babbca45e58dff5be39476d36/app/src/test/kotlin/org/spekframework/speksample/SpekStandard.kt
@artem_zin back to the topic. Which structure should I done within that case?
@artem_zin waiting you answer