summaryrefslogtreecommitdiff
path: root/game-engine/src/test/kotlin/org/luxons
diff options
context:
space:
mode:
authorJoffrey BION <joffrey.bion@gmail.com>2018-08-01 00:09:46 +0200
committerJoffrey BION <joffrey.bion@gmail.com>2018-08-01 01:45:04 +0200
commit1e98b6bdf6aac5df09545349373a9f9624f38692 (patch)
tree2c6a9ae994f6c20679c59ac9046a006ce4d0a083 /game-engine/src/test/kotlin/org/luxons
parentAdd history note about Kotlin migration (diff)
downloadseven-wonders-1e98b6bdf6aac5df09545349373a9f9624f38692.tar.gz
seven-wonders-1e98b6bdf6aac5df09545349373a9f9624f38692.tar.bz2
seven-wonders-1e98b6bdf6aac5df09545349373a9f9624f38692.zip
Remove checkstyle and add ktlint
Diffstat (limited to 'game-engine/src/test/kotlin/org/luxons')
-rw-r--r--game-engine/src/test/kotlin/org/luxons/sevenwonders/game/GameTest.kt5
-rw-r--r--game-engine/src/test/kotlin/org/luxons/sevenwonders/game/api/TableTest.kt4
-rw-r--r--game-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/BoardTest.kt5
-rw-r--r--game-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/MilitaryTest.kt6
-rw-r--r--game-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/RelativeBoardPositionTest.kt5
-rw-r--r--game-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/ScienceTest.kt5
-rw-r--r--game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/CardBackTest.kt3
-rw-r--r--game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/DecksTest.kt4
-rw-r--r--game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/HandRotationDirectionTest.kt3
-rw-r--r--game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/HandsTest.kt4
-rw-r--r--game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/RequirementsTest.kt5
-rw-r--r--game-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ProductionIncreaseSerializerTest.kt4
-rw-r--r--game-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourceTypesSerializerTest.kt4
-rw-r--r--game-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourcesSerializerTest.kt4
-rw-r--r--game-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/BonusPerBoardElementTest.kt23
-rw-r--r--game-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/DiscountTest.kt7
-rw-r--r--game-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/ProductionIncreaseTest.kt4
-rw-r--r--game-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/ScienceProgressTest.kt10
-rw-r--r--game-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/BestPriceCalculatorTest.kt6
-rw-r--r--game-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ProductionTest.kt12
-rw-r--r--game-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ResourcesTest.kt13
-rw-r--r--game-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/TradingRulesTest.kt7
-rw-r--r--game-engine/src/test/kotlin/org/luxons/sevenwonders/game/test/TestUtils.kt11
-rw-r--r--game-engine/src/test/kotlin/org/luxons/sevenwonders/game/wonders/WonderTest.kt7
24 files changed, 108 insertions, 53 deletions
diff --git a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/GameTest.kt b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/GameTest.kt
index 135f701d..fb797b77 100644
--- a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/GameTest.kt
+++ b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/GameTest.kt
@@ -1,6 +1,9 @@
package org.luxons.sevenwonders.game
-import org.junit.Assert.*
+import org.junit.Assert.assertEquals
+import org.junit.Assert.assertFalse
+import org.junit.Assert.assertNotNull
+import org.junit.Assert.assertTrue
import org.junit.Test
import org.luxons.sevenwonders.game.api.Action
import org.luxons.sevenwonders.game.api.HandCard
diff --git a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/api/TableTest.kt b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/api/TableTest.kt
index 3ae873a2..4b31a1c7 100644
--- a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/api/TableTest.kt
+++ b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/api/TableTest.kt
@@ -1,6 +1,8 @@
package org.luxons.sevenwonders.game.api
-import org.junit.Assert.*
+import org.junit.Assert.assertEquals
+import org.junit.Assert.assertFalse
+import org.junit.Assert.assertTrue
import org.junit.Assume.assumeTrue
import org.junit.experimental.theories.DataPoints
import org.junit.experimental.theories.Theories
diff --git a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/BoardTest.kt b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/BoardTest.kt
index 0f2a3e0c..e5b7af59 100644
--- a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/BoardTest.kt
+++ b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/BoardTest.kt
@@ -1,7 +1,9 @@
package org.luxons.sevenwonders.game.boards
import junit.framework.TestCase.assertEquals
-import org.junit.Assert.*
+import org.junit.Assert.assertFalse
+import org.junit.Assert.assertSame
+import org.junit.Assert.assertTrue
import org.junit.Assume.assumeTrue
import org.junit.Rule
import org.junit.Test
@@ -191,7 +193,6 @@ class BoardTest {
assertEquals(5 + gold / 3, score.totalPoints)
}
-
companion object {
@JvmStatic
diff --git a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/MilitaryTest.kt b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/MilitaryTest.kt
index 34a599c9..735dcaad 100644
--- a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/MilitaryTest.kt
+++ b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/MilitaryTest.kt
@@ -1,7 +1,6 @@
package org.luxons.sevenwonders.game.boards
-import java.util.HashMap
-
+import org.junit.Assert.assertEquals
import org.junit.Rule
import org.junit.experimental.theories.DataPoints
import org.junit.experimental.theories.FromDataPoints
@@ -10,8 +9,7 @@ import org.junit.experimental.theories.Theory
import org.junit.rules.ExpectedException
import org.junit.runner.RunWith
import org.luxons.sevenwonders.game.boards.Military.UnknownAgeException
-
-import org.junit.Assert.assertEquals
+import java.util.HashMap
@RunWith(Theories::class)
class MilitaryTest {
diff --git a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/RelativeBoardPositionTest.kt b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/RelativeBoardPositionTest.kt
index d9c79ac5..4f63557f 100644
--- a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/RelativeBoardPositionTest.kt
+++ b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/RelativeBoardPositionTest.kt
@@ -1,13 +1,12 @@
package org.luxons.sevenwonders.game.boards
+import org.junit.Assert.assertEquals
+import org.junit.Assume.assumeTrue
import org.junit.experimental.theories.DataPoints
import org.junit.experimental.theories.Theories
import org.junit.experimental.theories.Theory
import org.junit.runner.RunWith
-import org.junit.Assert.assertEquals
-import org.junit.Assume.assumeTrue
-
@RunWith(Theories::class)
class RelativeBoardPositionTest {
diff --git a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/ScienceTest.kt b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/ScienceTest.kt
index 8c2041e4..4fd02640 100644
--- a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/ScienceTest.kt
+++ b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/boards/ScienceTest.kt
@@ -1,13 +1,12 @@
package org.luxons.sevenwonders.game.boards
+import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.experimental.theories.DataPoints
import org.junit.experimental.theories.Theories
import org.junit.experimental.theories.Theory
import org.junit.runner.RunWith
-import org.luxons.sevenwonders.game.test.*
-
-import org.junit.Assert.assertEquals
+import org.luxons.sevenwonders.game.test.createScience
@RunWith(Theories::class)
class ScienceTest {
diff --git a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/CardBackTest.kt b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/CardBackTest.kt
index 68dcd5e7..8b2791a6 100644
--- a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/CardBackTest.kt
+++ b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/CardBackTest.kt
@@ -1,8 +1,7 @@
package org.luxons.sevenwonders.game.cards
-import org.junit.Test
-
import org.junit.Assert.assertEquals
+import org.junit.Test
class CardBackTest {
diff --git a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/DecksTest.kt b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/DecksTest.kt
index 673f8946..ab32937b 100644
--- a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/DecksTest.kt
+++ b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/DecksTest.kt
@@ -1,6 +1,8 @@
package org.luxons.sevenwonders.game.cards
-import org.junit.Assert.*
+import org.junit.Assert.assertEquals
+import org.junit.Assert.assertNotNull
+import org.junit.Assert.assertTrue
import org.junit.Assume.assumeTrue
import org.junit.Rule
import org.junit.Test
diff --git a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/HandRotationDirectionTest.kt b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/HandRotationDirectionTest.kt
index d3a533ea..f7ddfb5d 100644
--- a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/HandRotationDirectionTest.kt
+++ b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/HandRotationDirectionTest.kt
@@ -1,8 +1,7 @@
package org.luxons.sevenwonders.game.cards
-import org.junit.Test
-
import org.junit.Assert.assertEquals
+import org.junit.Test
class HandRotationDirectionTest {
diff --git a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/HandsTest.kt b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/HandsTest.kt
index e7c3835a..11794ed8 100644
--- a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/HandsTest.kt
+++ b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/HandsTest.kt
@@ -1,6 +1,8 @@
package org.luxons.sevenwonders.game.cards
-import org.junit.Assert.*
+import org.junit.Assert.assertEquals
+import org.junit.Assert.assertFalse
+import org.junit.Assert.assertTrue
import org.junit.Assume.assumeTrue
import org.junit.Test
import org.junit.experimental.theories.DataPoints
diff --git a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/RequirementsTest.kt b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/RequirementsTest.kt
index a26034f2..2fd180c1 100644
--- a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/RequirementsTest.kt
+++ b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/cards/RequirementsTest.kt
@@ -1,6 +1,9 @@
package org.luxons.sevenwonders.game.cards
-import org.junit.Assert.*
+import org.junit.Assert.assertEquals
+import org.junit.Assert.assertFalse
+import org.junit.Assert.assertSame
+import org.junit.Assert.assertTrue
import org.junit.Assume.assumeTrue
import org.junit.Test
import org.junit.experimental.theories.DataPoints
diff --git a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ProductionIncreaseSerializerTest.kt b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ProductionIncreaseSerializerTest.kt
index 1b87e593..8c3d6288 100644
--- a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ProductionIncreaseSerializerTest.kt
+++ b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ProductionIncreaseSerializerTest.kt
@@ -19,9 +19,7 @@ class ProductionIncreaseSerializerTest {
@Before
fun setUp() {
- val resourceTypeList = object : TypeToken<List<ResourceType>>() {
-
- }.type
+ val resourceTypeList = object : TypeToken<List<ResourceType>>() {}.type
gson = GsonBuilder().registerTypeAdapter(Resources::class.java, ResourcesSerializer())
.registerTypeAdapter(MutableResources::class.java, ResourcesSerializer())
.registerTypeAdapter(ResourceType::class.java, ResourceTypeSerializer())
diff --git a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourceTypesSerializerTest.kt b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourceTypesSerializerTest.kt
index 24aed03d..31e53d23 100644
--- a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourceTypesSerializerTest.kt
+++ b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourceTypesSerializerTest.kt
@@ -21,9 +21,7 @@ class ResourceTypesSerializerTest {
}
private fun createListTypeToken(): Type {
- return object : TypeToken<List<ResourceType>>() {
-
- }.type
+ return object : TypeToken<List<ResourceType>>() {}.type
}
@Test
diff --git a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourcesSerializerTest.kt b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourcesSerializerTest.kt
index 426e0f0e..91384922 100644
--- a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourcesSerializerTest.kt
+++ b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/data/serializers/ResourcesSerializerTest.kt
@@ -7,7 +7,9 @@ import org.junit.Assert.assertNull
import org.junit.Before
import org.junit.Test
import org.luxons.sevenwonders.game.resources.MutableResources
-import org.luxons.sevenwonders.game.resources.ResourceType.*
+import org.luxons.sevenwonders.game.resources.ResourceType.CLAY
+import org.luxons.sevenwonders.game.resources.ResourceType.STONE
+import org.luxons.sevenwonders.game.resources.ResourceType.WOOD
import org.luxons.sevenwonders.game.resources.Resources
import org.luxons.sevenwonders.game.resources.emptyResources
import org.luxons.sevenwonders.game.resources.resourcesOf
diff --git a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/BonusPerBoardElementTest.kt b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/BonusPerBoardElementTest.kt
index 8899eb06..38da14f8 100644
--- a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/BonusPerBoardElementTest.kt
+++ b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/BonusPerBoardElementTest.kt
@@ -29,7 +29,12 @@ class BonusPerBoardElementTest {
@Theory
fun computePoints_countsCards(
- boardPosition: RelativeBoardPosition, nbCards: Int, nbOtherCards: Int, points: Int, gold: Int, color: Color
+ boardPosition: RelativeBoardPosition,
+ nbCards: Int,
+ nbOtherCards: Int,
+ points: Int,
+ gold: Int,
+ color: Color
) {
val board = table!!.getBoard(0, boardPosition)
addCards(board, nbCards, nbOtherCards, color)
@@ -41,7 +46,10 @@ class BonusPerBoardElementTest {
@Theory
fun computePoints_countsDefeatTokens(
- boardPosition: RelativeBoardPosition, nbDefeatTokens: Int, points: Int, gold: Int
+ boardPosition: RelativeBoardPosition,
+ nbDefeatTokens: Int,
+ points: Int,
+ gold: Int
) {
val board = table!!.getBoard(0, boardPosition)
for (i in 0 until nbDefeatTokens) {
@@ -68,7 +76,12 @@ class BonusPerBoardElementTest {
@Theory
fun apply_countsCards(
- boardPosition: RelativeBoardPosition, nbCards: Int, nbOtherCards: Int, points: Int, gold: Int, color: Color
+ boardPosition: RelativeBoardPosition,
+ nbCards: Int,
+ nbOtherCards: Int,
+ points: Int,
+ gold: Int,
+ color: Color
) {
val board = table!!.getBoard(0, boardPosition)
addCards(board, nbCards, nbOtherCards, color)
@@ -82,9 +95,7 @@ class BonusPerBoardElementTest {
}
@Theory
- fun apply_countsDefeatTokens(
- boardPosition: RelativeBoardPosition, nbDefeatTokens: Int, points: Int, gold: Int
- ) {
+ fun apply_countsDefeatTokens(boardPosition: RelativeBoardPosition, nbDefeatTokens: Int, points: Int, gold: Int) {
val board = table!!.getBoard(0, boardPosition)
for (i in 0 until nbDefeatTokens) {
board.military.defeat()
diff --git a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/DiscountTest.kt b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/DiscountTest.kt
index 2cd54b2e..8d22497d 100644
--- a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/DiscountTest.kt
+++ b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/DiscountTest.kt
@@ -26,8 +26,11 @@ class DiscountTest {
@Theory
fun apply_doesNotAffectOtherResources(
- discountedPrice: Int, discountedType: ResourceType, provider: Provider,
- otherType: ResourceType, otherProvider: Provider
+ discountedPrice: Int,
+ discountedType: ResourceType,
+ provider: Provider,
+ otherType: ResourceType,
+ otherProvider: Provider
) {
Assume.assumeTrue(otherProvider != provider)
Assume.assumeTrue(otherType != discountedType)
diff --git a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/ProductionIncreaseTest.kt b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/ProductionIncreaseTest.kt
index 7973131c..225ffcbb 100644
--- a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/ProductionIncreaseTest.kt
+++ b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/ProductionIncreaseTest.kt
@@ -1,6 +1,8 @@
package org.luxons.sevenwonders.game.effects
-import org.junit.Assert.*
+import org.junit.Assert.assertEquals
+import org.junit.Assert.assertFalse
+import org.junit.Assert.assertTrue
import org.junit.experimental.theories.DataPoints
import org.junit.experimental.theories.Theories
import org.junit.experimental.theories.Theory
diff --git a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/ScienceProgressTest.kt b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/ScienceProgressTest.kt
index db13e641..6b4cd8f3 100644
--- a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/ScienceProgressTest.kt
+++ b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/effects/ScienceProgressTest.kt
@@ -16,8 +16,14 @@ class ScienceProgressTest {
@Theory
fun apply_initContainsAddedScience(
- initCompasses: Int, initWheels: Int, initTablets: Int, initJokers: Int,
- compasses: Int, wheels: Int, tablets: Int, jokers: Int
+ initCompasses: Int,
+ initWheels: Int,
+ initTablets: Int,
+ initJokers: Int,
+ compasses: Int,
+ wheels: Int,
+ tablets: Int,
+ jokers: Int
) {
val board = testBoard(ResourceType.ORE)
val initialScience = createScience(initCompasses, initWheels, initTablets, initJokers)
diff --git a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/BestPriceCalculatorTest.kt b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/BestPriceCalculatorTest.kt
index 67537644..032d8a1a 100644
--- a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/BestPriceCalculatorTest.kt
+++ b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/BestPriceCalculatorTest.kt
@@ -6,7 +6,11 @@ import org.luxons.sevenwonders.game.SimplePlayer
import org.luxons.sevenwonders.game.api.Table
import org.luxons.sevenwonders.game.resources.Provider.LEFT_PLAYER
import org.luxons.sevenwonders.game.resources.Provider.RIGHT_PLAYER
-import org.luxons.sevenwonders.game.resources.ResourceType.*
+import org.luxons.sevenwonders.game.resources.ResourceType.CLAY
+import org.luxons.sevenwonders.game.resources.ResourceType.GLASS
+import org.luxons.sevenwonders.game.resources.ResourceType.ORE
+import org.luxons.sevenwonders.game.resources.ResourceType.STONE
+import org.luxons.sevenwonders.game.resources.ResourceType.WOOD
import org.luxons.sevenwonders.game.test.createTransaction
import org.luxons.sevenwonders.game.test.createTransactions
import org.luxons.sevenwonders.game.test.testBoard
diff --git a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ProductionTest.kt b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ProductionTest.kt
index 79be288f..2566f32f 100644
--- a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ProductionTest.kt
+++ b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ProductionTest.kt
@@ -1,9 +1,17 @@
package org.luxons.sevenwonders.game.resources
-import org.junit.Assert.*
+import org.junit.Assert.assertEquals
+import org.junit.Assert.assertFalse
+import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Test
-import org.luxons.sevenwonders.game.resources.ResourceType.*
+import org.luxons.sevenwonders.game.resources.ResourceType.CLAY
+import org.luxons.sevenwonders.game.resources.ResourceType.GLASS
+import org.luxons.sevenwonders.game.resources.ResourceType.LOOM
+import org.luxons.sevenwonders.game.resources.ResourceType.ORE
+import org.luxons.sevenwonders.game.resources.ResourceType.PAPYRUS
+import org.luxons.sevenwonders.game.resources.ResourceType.STONE
+import org.luxons.sevenwonders.game.resources.ResourceType.WOOD
import java.util.EnumSet
import java.util.HashSet
diff --git a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ResourcesTest.kt b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ResourcesTest.kt
index 9fa0bc55..a931949f 100644
--- a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ResourcesTest.kt
+++ b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/ResourcesTest.kt
@@ -1,10 +1,19 @@
package org.luxons.sevenwonders.game.resources
-import org.junit.Assert.*
+import org.junit.Assert.assertEquals
+import org.junit.Assert.assertFalse
+import org.junit.Assert.assertTrue
import org.junit.Rule
import org.junit.Test
import org.junit.rules.ExpectedException
-import org.luxons.sevenwonders.game.resources.ResourceType.*
+import org.luxons.sevenwonders.game.resources.ResourceType.CLAY
+import org.luxons.sevenwonders.game.resources.ResourceType.GLASS
+import org.luxons.sevenwonders.game.resources.ResourceType.LOOM
+import org.luxons.sevenwonders.game.resources.ResourceType.ORE
+import org.luxons.sevenwonders.game.resources.ResourceType.PAPYRUS
+import org.luxons.sevenwonders.game.resources.ResourceType.STONE
+import org.luxons.sevenwonders.game.resources.ResourceType.WOOD
+import org.luxons.sevenwonders.game.resources.ResourceType.values
import java.util.NoSuchElementException
class ResourcesTest {
diff --git a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/TradingRulesTest.kt b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/TradingRulesTest.kt
index ac3f72de..e44c38f3 100644
--- a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/TradingRulesTest.kt
+++ b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/resources/TradingRulesTest.kt
@@ -15,8 +15,11 @@ class TradingRulesTest {
@Theory
fun setCost_overridesCost(
- defaultCost: Int, overriddenCost: Int, overriddenProvider: Provider,
- provider: Provider, type: ResourceType
+ defaultCost: Int,
+ overriddenCost: Int,
+ overriddenProvider: Provider,
+ provider: Provider,
+ type: ResourceType
) {
assumeTrue(defaultCost != overriddenCost)
assumeTrue(overriddenProvider != provider)
diff --git a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/test/TestUtils.kt b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/test/TestUtils.kt
index 1a360a77..383c77fa 100644
--- a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/test/TestUtils.kt
+++ b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/test/TestUtils.kt
@@ -209,14 +209,19 @@ internal fun playCardWithEffect(player: Player, color: Color, effect: Effect) {
card.applyTo(player, noTransactions())
}
-internal fun createMove(context: PlayerContext, card: Card, type: MoveType, vararg transactions: ResourceTransaction): Move {
+internal fun createMove(
+ context: PlayerContext,
+ card: Card,
+ type: MoveType,
+ vararg transactions: ResourceTransaction
+): Move {
val playerMove = PlayerMove(type, card.name, Arrays.asList(*transactions))
return type.create(playerMove, card, context)
}
internal fun singleBoardPlayer(board: Board): Player {
- return object: Player {
- override val index=0
+ return object : Player {
+ override val index = 0
override val board = board
override fun getBoard(relativePosition: RelativeBoardPosition): Board = board
}
diff --git a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/wonders/WonderTest.kt b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/wonders/WonderTest.kt
index 3d2f3a80..6c3b933f 100644
--- a/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/wonders/WonderTest.kt
+++ b/game-engine/src/test/kotlin/org/luxons/sevenwonders/game/wonders/WonderTest.kt
@@ -1,11 +1,10 @@
package org.luxons.sevenwonders.game.wonders
-import org.junit.Test
-import org.luxons.sevenwonders.game.cards.CardBack
-import org.luxons.sevenwonders.game.test.*
-
import org.junit.Assert.assertEquals
import org.junit.Assert.fail
+import org.junit.Test
+import org.luxons.sevenwonders.game.cards.CardBack
+import org.luxons.sevenwonders.game.test.testWonder
class WonderTest {
bgstack15