mirror of
https://github.com/mihonapp/mihon.git
synced 2025-10-28 21:07:57 +01:00
Minor cleanup, remove some usages of ArrayList
This commit is contained in:
@@ -236,7 +236,7 @@ class BackupTest {
|
||||
manga.id = backupManager.databaseHelper.insertManga(manga).executeAsBlocking().insertedId()
|
||||
|
||||
// Create restore list
|
||||
val chapters = ArrayList<Chapter>()
|
||||
val chapters = mutableListOf<Chapter>()
|
||||
for (i in 1..8) {
|
||||
val chapter = getSingleChapter("Chapter $i")
|
||||
chapter.read = true
|
||||
@@ -249,7 +249,7 @@ class BackupTest {
|
||||
|
||||
// Fetch chapters from upstream
|
||||
// Create list
|
||||
val chaptersRemote = ArrayList<Chapter>()
|
||||
val chaptersRemote = mutableListOf<Chapter>()
|
||||
(1..10).mapTo(chaptersRemote) { getSingleChapter("Chapter $it") }
|
||||
`when`(source.fetchChapterList(manga)).thenReturn(Observable.just(chaptersRemote))
|
||||
|
||||
@@ -284,7 +284,7 @@ class BackupTest {
|
||||
|
||||
val historyJson = getSingleHistory(chapter)
|
||||
|
||||
val historyList = ArrayList<DHistory>()
|
||||
val historyList = mutableListOf<DHistory>()
|
||||
historyList.add(historyJson)
|
||||
|
||||
// Check parser
|
||||
|
||||
@@ -11,7 +11,6 @@ import eu.kanade.tachiyomi.data.database.models.LibraryManga
|
||||
import eu.kanade.tachiyomi.source.SourceManager
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import eu.kanade.tachiyomi.source.online.HttpSource
|
||||
import java.util.ArrayList
|
||||
import org.assertj.core.api.Assertions.assertThat
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
@@ -107,7 +106,7 @@ class LibraryUpdateServiceTest {
|
||||
}
|
||||
|
||||
private fun createChapters(vararg urls: String): List<Chapter> {
|
||||
val list = ArrayList<Chapter>()
|
||||
val list = mutableListOf<Chapter>()
|
||||
for (url in urls) {
|
||||
val c = Chapter.create()
|
||||
c.url = url
|
||||
@@ -118,7 +117,7 @@ class LibraryUpdateServiceTest {
|
||||
}
|
||||
|
||||
private fun createManga(vararg urls: String): List<LibraryManga> {
|
||||
val list = ArrayList<LibraryManga>()
|
||||
val list = mutableListOf<LibraryManga>()
|
||||
for (url in urls) {
|
||||
val m = LibraryManga()
|
||||
m.url = url
|
||||
|
||||
Reference in New Issue
Block a user