parent
5132f4850f
commit
0d41c60a38
@ -1,28 +0,0 @@
|
||||
package eu.kanade.tachiyomi.injection.module;
|
||||
|
||||
import android.app.Application;
|
||||
|
||||
import org.mockito.Mockito;
|
||||
|
||||
import eu.kanade.tachiyomi.data.database.DatabaseHelper;
|
||||
import eu.kanade.tachiyomi.data.network.NetworkHelper;
|
||||
import eu.kanade.tachiyomi.data.source.SourceManager;
|
||||
|
||||
public class TestDataModule extends DataModule {
|
||||
|
||||
@Override
|
||||
DatabaseHelper provideDatabaseHelper(Application app) {
|
||||
return Mockito.mock(DatabaseHelper.class, Mockito.RETURNS_DEEP_STUBS);
|
||||
}
|
||||
|
||||
@Override
|
||||
NetworkHelper provideNetworkHelper(Application app) {
|
||||
return Mockito.mock(NetworkHelper.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
SourceManager provideSourceManager(Application app) {
|
||||
return Mockito.mock(SourceManager.class, Mockito.RETURNS_DEEP_STUBS);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package eu.kanade.tachiyomi.injection.module
|
||||
|
||||
import android.app.Application
|
||||
import eu.kanade.tachiyomi.data.database.DatabaseHelper
|
||||
import eu.kanade.tachiyomi.data.network.NetworkHelper
|
||||
import eu.kanade.tachiyomi.data.source.SourceManager
|
||||
import org.mockito.Mockito
|
||||
|
||||
class TestDataModule : DataModule() {
|
||||
|
||||
override fun provideDatabaseHelper(app: Application): DatabaseHelper {
|
||||
return Mockito.mock(DatabaseHelper::class.java, Mockito.RETURNS_DEEP_STUBS)
|
||||
}
|
||||
|
||||
override fun provideNetworkHelper(app: Application): NetworkHelper {
|
||||
return Mockito.mock(NetworkHelper::class.java)
|
||||
}
|
||||
|
||||
override fun provideSourceManager(app: Application): SourceManager {
|
||||
return Mockito.mock(SourceManager::class.java, Mockito.RETURNS_DEEP_STUBS)
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in new issue