sockeqwe / mosby

A Model-View-Presenter / Model-View-Intent library for modern Android apps
http://hannesdorfmann.com/mosby/
Apache License 2.0
5.49k stars 841 forks source link

MVI test sample #284

Open dominikmicuta opened 6 years ago

dominikmicuta commented 6 years ago

@sockeqwe please add instrumental / espresso test to MVI sample. You talked about it in Fragmented podcast and its hard to imagine and implement the intercepting part of the view without any guidance.

sockeqwe commented 6 years ago

Yes, will do so ... Unfortunately, I wanted to keep things simple and haven't used Dagger. Now for the MVI intercepting part it may be easier to use dagger. So perhaps I have to migrate the sample app to dagger before.

In the meantime you can take a look at this presentation I gave earlier this year:

https://speakerdeck.com/sockeqwe/reactive-statemanagement-with-model-view-intent

The testing part begins at slide number 92.

dominikmicuta commented 6 years ago

Perfect! Thanks for the link. I will go through the presentation. Maybe sample could have also things like: navigation that don`t change the state, navigation that is emitted as part of the business logic, validation of inputs etc. But as you already mentioned, this isn't really the scope of MVI. I just wonder how this looks like in your projects.

lucamtudor commented 6 years ago

I'm looking forward to it!

sockeqwe commented 6 years ago

Sorry, I still havent found time to do it. In the mean time you may find this useful: https://www.youtube.com/watch?v=osM-1z5tJ4g&index=27&list=PLr5cF6ekyIDgWee0wtwMKSGcoMvt5fkn_&t=314s