Added tests (WIP, failing)

This commit is contained in:
2024-06-21 10:37:56 +02:00
parent 1248288e98
commit abe163d09f
8 changed files with 89 additions and 19 deletions

View 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))
}
}