Hello everyone) First of all, thanks a lot for the...
# mvikotlin
y
Hello everyone) First of all, thanks a lot for the greatest MVI library) Could someone recommend a way how to test Bootstrapper or Executor in isolation? I have complex logic there and want to verify that I am dispatching/publishing right events. The dispatch and publish methods are protected so I couldn’t get access to it to verify right argument.
a
Both Bootstrapper and Executor are designed to be implementation details of Stores. So it is recommended to keep them private and test the whole Store instead. However if you really want to test them, you should call
init
methods from your tests first. This will allow you to listen for outputs, like Action, Result or Label.
y
thanks a lot for the quick answer) We are already testing the whole Store as you did in the samples. However there are some cases when we want to add isolated tests. Thanks for the hint)
👍 1