diff options
author | Joffrey Bion <joffrey.bion@booking.com> | 2020-08-20 15:36:49 +0200 |
---|---|---|
committer | Joffrey Bion <joffrey.bion@booking.com> | 2020-08-20 15:44:47 +0200 |
commit | 53cdfdfd3d7f4a8fed08ee475b2d5936155f6875 (patch) | |
tree | 51410abd200b107b06c3ff144c77ba5a687a4480 /sw-engine/src/test/kotlin/org | |
parent | Upgrade to Spring Boot 2.3.3 (diff) | |
download | seven-wonders-53cdfdfd3d7f4a8fed08ee475b2d5936155f6875.tar.gz seven-wonders-53cdfdfd3d7f4a8fed08ee475b2d5936155f6875.tar.bz2 seven-wonders-53cdfdfd3d7f4a8fed08ee475b2d5936155f6875.zip |
Fix style & sort imports
Diffstat (limited to 'sw-engine/src/test/kotlin/org')
3 files changed, 15 insertions, 29 deletions
diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/cards/RequirementsTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/cards/RequirementsTest.kt index da0ae124..27b3cad0 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/cards/RequirementsTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/cards/RequirementsTest.kt @@ -43,9 +43,7 @@ class RequirementsTest { val board = testBoard(ResourceType.CLAY, boardGold) val player = singleBoardPlayer(board) - assertEquals(boardGold >= requiredGold, requirements.areMetWithHelpBy(board, - noTransactions() - )) + assertEquals(boardGold >= requiredGold, requirements.areMetWithHelpBy(board, noTransactions())) val satisfaction = requirements.assess(player) if (boardGold >= requiredGold) { @@ -66,9 +64,7 @@ class RequirementsTest { val board = testBoard(initialResource, 0) val player = singleBoardPlayer(board) - assertEquals(initialResource == requiredResource, requirements.areMetWithHelpBy(board, - noTransactions() - )) + assertEquals(initialResource == requiredResource, requirements.areMetWithHelpBy(board, noTransactions())) if (initialResource == requiredResource) { val satisfaction = requirements.assess(player) @@ -90,9 +86,7 @@ class RequirementsTest { board.production.addFixedResource(producedResource, 1) val player = singleBoardPlayer(board) - assertEquals(producedResource == requiredResource, requirements.areMetWithHelpBy(board, - noTransactions() - )) + assertEquals(producedResource == requiredResource, requirements.areMetWithHelpBy(board, noTransactions())) if (producedResource == requiredResource) { val satisfaction = requirements.assess(player) diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/converters/BoardsKtTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/converters/BoardsKtTest.kt index 96c5e500..c1b17d4a 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/converters/BoardsKtTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/converters/BoardsKtTest.kt @@ -75,9 +75,9 @@ class BoardsKtTest { val cards = listOf(res1, green1, green2, res2, blue1, res3) val cols = cards.toColumns() val expectedCols = listOf( - listOf(res1, res2, res3), - listOf(blue1), - listOf(green1, green2) + listOf(res1, res2, res3), + listOf(blue1), + listOf(green1, green2) ) assertEquals(expectedCols, cols) } diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/test/TestUtils.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/test/TestUtils.kt index 4db574e2..332718f9 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/test/TestUtils.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/test/TestUtils.kt @@ -2,32 +2,27 @@ package org.luxons.sevenwonders.engine.test import org.luxons.sevenwonders.engine.Player import org.luxons.sevenwonders.engine.PlayerContext -import org.luxons.sevenwonders.model.resources.CountedResource -import org.luxons.sevenwonders.model.Settings -import org.luxons.sevenwonders.model.PlayerMove import org.luxons.sevenwonders.engine.boards.Board -import org.luxons.sevenwonders.model.boards.RelativeBoardPosition import org.luxons.sevenwonders.engine.boards.Science import org.luxons.sevenwonders.engine.boards.ScienceType import org.luxons.sevenwonders.engine.boards.Table import org.luxons.sevenwonders.engine.cards.Card -import org.luxons.sevenwonders.model.cards.CardBack -import org.luxons.sevenwonders.model.cards.Color import org.luxons.sevenwonders.engine.cards.Requirements import org.luxons.sevenwonders.engine.effects.Effect import org.luxons.sevenwonders.engine.effects.ScienceProgress import org.luxons.sevenwonders.engine.moves.Move -import org.luxons.sevenwonders.model.MoveType import org.luxons.sevenwonders.engine.moves.resolve import org.luxons.sevenwonders.engine.resources.Production -import org.luxons.sevenwonders.model.resources.Provider -import org.luxons.sevenwonders.model.resources.ResourceTransaction -import org.luxons.sevenwonders.model.resources.ResourceTransactions -import org.luxons.sevenwonders.model.resources.ResourceType -import org.luxons.sevenwonders.model.resources.noTransactions import org.luxons.sevenwonders.engine.resources.resourcesOf import org.luxons.sevenwonders.engine.wonders.Wonder import org.luxons.sevenwonders.engine.wonders.WonderStage +import org.luxons.sevenwonders.model.MoveType +import org.luxons.sevenwonders.model.PlayerMove +import org.luxons.sevenwonders.model.Settings +import org.luxons.sevenwonders.model.boards.RelativeBoardPosition +import org.luxons.sevenwonders.model.cards.CardBack +import org.luxons.sevenwonders.model.cards.Color +import org.luxons.sevenwonders.model.resources.* internal const val SEED: Long = 42 @@ -72,8 +67,7 @@ internal fun createTransactions(provider: Provider, vararg resources: ResourceTy internal fun createTransactions(vararg transactions: ResourceTransaction): ResourceTransactions = transactions.toSet() internal fun createTransaction(provider: Provider, vararg resources: ResourceType): ResourceTransaction = - ResourceTransaction(provider, - resources.map { CountedResource(1, it) }) + ResourceTransaction(provider, resources.map { CountedResource(1, it) }) internal fun createRequirements(vararg types: ResourceType): Requirements = Requirements(resources = resourcesOf(*types)) @@ -92,9 +86,7 @@ internal fun testCard( effect: Effect? = null ): Card { val effects = if (effect == null) emptyList() else listOf(effect) - return Card(name, color, requirements, effects, null, emptyList(), "path/to/card/image", - CardBack("image-III") - ) + return Card(name, color, requirements, effects, null, emptyList(), "path/to/card/image", CardBack("image-III")) } internal fun addCards(board: Board, nbCardsOfColor: Int, nbOtherCards: Int, color: Color) { |