ursus
07/25/2021, 3:05 AM@Test `if any registration api returns 410, logout registration session` {
val appComponent = TestAppComponent.create()
val regisrationSubComponent = appComponent.registrationSubcomponentFactory.create()
val regisrationService = regisrationSubComponent.regisrationService
//
// MockWebserver to return 410
regisrationService.whatever()
asserThat(onboardingManager.isLoggedOut).isTrue()
}
Question is, the setup is rather involved (to include all needed modules, etc); and I don't really feel comfortable doing this in a given feature's module, since if I mess up the setup, it doesn't match the real app, and at that point its pointless integration test.
I was thinking the most beneficial place will be the final :app
module since that really includes all dependencies, modules, config etc which will end up in the real app
However, since most of features are shared across apps, lets say like the registration like in the sample; should I just
1. copy paste the test to every app
2. somehow try to share it?