Skip to content

net.natura.testcommons.extensions

Lucas de Souza da Conceição edited this page Jul 10, 2020 · 7 revisions

Package net.natura.testcommons.extensions

Types

Name Summary
CoroutinesExtension A JUnit5 test extension to allow testing coroutines that use the main dispatcher. Without this you'd run into "java.lang.IllegalStateException: Module with the Main dispatcher had failed to initialize. For tests Dispatchers.setMain from kotlinx-coroutines-test module can be used"class CoroutinesExtension : BeforeEachCallback, AfterEachCallback
InstantTaskExecutorExtension A JUnit 5 extension that swaps the background executor used by the Architecture Components with a different one which executes each task synchronously.class InstantTaskExecutorExtension : BeforeEachCallback, AfterEachCallback
KoinExtension A JUnit5 extension that starts and stops Koin instance between tests.class KoinExtension : BeforeEachCallback, AfterEachCallback
Clone this wiki locally