Added tests (WIP, failing)
This commit is contained in:
36
composeApp/src/commonTest/kotlin/domain/NeighbourClueTest.kt
Normal file
36
composeApp/src/commonTest/kotlin/domain/NeighbourClueTest.kt
Normal file
@@ -0,0 +1,36 @@
|
||||
package domain
|
||||
|
||||
import ch.tutteli.atrium.api.fluent.en_GB.feature
|
||||
import ch.tutteli.atrium.api.fluent.en_GB.size
|
||||
import ch.tutteli.atrium.api.fluent.en_GB.toBeLessThan
|
||||
import ch.tutteli.atrium.api.fluent.en_GB.toEqual
|
||||
import ch.tutteli.atrium.api.fluent.en_GB.toHaveSize
|
||||
import ch.tutteli.atrium.api.verbs.expect
|
||||
import domain.Item
|
||||
import kotlin.test.Test
|
||||
|
||||
class NeighbourClueTest {
|
||||
@Test
|
||||
fun `ensure actual neighbours are valid`() {
|
||||
val size = 5
|
||||
val grid = ItemClass.randomClasses(size)
|
||||
.map {
|
||||
it.randomItems(size).map { item -> Item(item) }
|
||||
}
|
||||
.map { row ->
|
||||
GameRow(
|
||||
category = row.first().itemType.companion,
|
||||
options = row,
|
||||
cells = row.map {
|
||||
GameCell(
|
||||
selection = it,
|
||||
solution = it,
|
||||
options = mutableListOf()
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
NeighbourClue(Item(Animals.ANT), Item(Profession.ASTRONAUT))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user