mirror of
https://github.com/MinimalBible/MinimalBible
synced 2025-07-07 00:34:42 -04:00
Refactor BookDownloadManager to Kotlin
I don't like that I had to make one static method a class method, but I like how much cleaner everything else is!
This commit is contained in:
@ -91,7 +91,7 @@ public class BookDownloadManagerTest extends MBTestCase implements Injector {
|
||||
|
||||
public void testJobIdMatch() {
|
||||
final Book toInstall = installableBooks().toBlocking().first();
|
||||
final String jobName = BookDownloadManager.getJobId(toInstall);
|
||||
final String jobName = bookDownloadManager.getJobId(toInstall);
|
||||
final AtomicBoolean jobNameMatch = new AtomicBoolean(false);
|
||||
|
||||
JobManager.addWorkListener(new WorkListener() {
|
||||
@ -138,12 +138,6 @@ public class BookDownloadManagerTest extends MBTestCase implements Injector {
|
||||
prefs = mock(DownloadPrefs.class);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
Injector provideInjector() {
|
||||
return i;
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
Books provideBooks() {
|
||||
@ -170,5 +164,11 @@ public class BookDownloadManagerTest extends MBTestCase implements Injector {
|
||||
return new RefreshManager(installers,
|
||||
prefs, manager);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
BookDownloadManager bookDownloadManager(Books installed, RefreshManager rm) {
|
||||
return new BookDownloadManager(installed, rm);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user