mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
parent
01839dec6e
commit
de3377c0fe
16 changed files with 99 additions and 84 deletions
23
app/src/test/kotlin/ModelFunctions.kt
Normal file
23
app/src/test/kotlin/ModelFunctions.kt
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import fr.free.nrw.commons.category.CategoryItem
|
||||
import fr.free.nrw.commons.upload.structure.depictions.DepictedItem
|
||||
|
||||
fun depictedItem(
|
||||
name: String = "label",
|
||||
description: String = "desc",
|
||||
imageUrl: String = "",
|
||||
instanceOfs: List<String> = listOf(),
|
||||
commonsCategories: List<String> = listOf(),
|
||||
isSelected: Boolean = false,
|
||||
id: String = "entityId"
|
||||
) = DepictedItem(
|
||||
name = name,
|
||||
description = description,
|
||||
imageUrl = imageUrl,
|
||||
instanceOfs = instanceOfs,
|
||||
commonsCategories = commonsCategories,
|
||||
isSelected = isSelected,
|
||||
id = id
|
||||
)
|
||||
|
||||
fun categoryItem(name: String = "name", selected: Boolean = false) =
|
||||
CategoryItem(name, selected)
|
||||
Loading…
Add table
Add a link
Reference in a new issue