nerdstone
12/09/2019, 2:25 PMLuis Munoz
12/09/2019, 6:38 PMLuke Sleeman
12/09/2019, 10:10 PMrunBlockingTest
?
Are you also passing in TestCoroutineDispatcher
instead of using something like withContext(<http://Dispatchers.IO|Dispatchers.IO>)
?
Those are the two issues I've bumped into with tests of coroutines.
Apart from that it would help if you could provide us with more detailed information on what is going wrong 🙂nerdstone
12/10/2019, 6:21 AMDispatcher.Default
scope then using the parsed model, I create views on the main thread. Then I have the NeatFormValidator
class that validates the data entered on the views before submitting the form. I was writing test for the validator class when I encountered the issues mentioned above.TestCoroutineDispatcher
for my test classes. And just to give more details on the projects background: the library allows you to create views from json; parses the json into a model, register form rules for handling skip logic and calculations, creates the view (all this done on the `JsonFormBuilder`class using coroutines) with different contexts (Default, IO and Main) respectively. The validator class is a singleton instance of the JsonFormBuilder
Luke Sleeman
12/10/2019, 8:14 AMnerdstone
12/10/2019, 8:20 AM