Skip to content

Commit

Permalink
chore: cleanup test code
Browse files Browse the repository at this point in the history
  • Loading branch information
alemazzo committed Sep 19, 2023
1 parent 4fa79ee commit 963a426
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 22 deletions.
1 change: 0 additions & 1 deletion src/test/scala/scatan/model/building/BuildingTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ class BuildingTest extends BaseTest:

"A Building" should "exists" in {
val building: Building = Building(BuildingType.Settlement)
building should not be null
}

it should "have a building type" in {
Expand Down
5 changes: 0 additions & 5 deletions src/test/scala/scatan/model/building/BuildingTypeTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,18 @@ class BuildingTypeTest extends BaseTest:

"A BuildingType" should "exists" in {
val buildingType: BuildingType = BuildingType.Settlement
buildingType should not be null
}

it should "be able to be a settlement" in {
val buildingType: BuildingType = BuildingType.Settlement
buildingType should be(BuildingType.Settlement)
}

it should "be able to be a city" in {
val buildingType: BuildingType = BuildingType.City
buildingType should be(BuildingType.City)
}

it should "be able to be a road" in {
val buildingType: BuildingType = BuildingType.Road
buildingType should be(BuildingType.Road)
}

class BuildingTypeCostTest extends BaseTest:
Expand All @@ -49,7 +45,6 @@ class BuildingTypeCostTest extends BaseTest:
Rock * 3
)
)

}

"A Road" should "cost 1 wood, 1 brick" in {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ import org.scalatest.matchers.should
import scatan.model.{DevelopmentCard, DevelopmentType}
import scatan.BaseTest

class DevelpmentCardTest extends BaseTest:
class DevelopmentCardTest extends BaseTest:

"A DevelopmentCard" should "exists" in {
val developmentCard: DevelopmentCard = DevelopmentCard(DevelopmentType.Knight)
developmentCard should not be null
}

it should "have a development type" in {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,24 @@ class DevelopmentTypeTest extends BaseTest:

"A DevelopmentType" should "exists" in {
val developmentType: DevelopmentType = DevelopmentType.Knight
developmentType should not be null
}

it should "be able to be a knight" in {
val developmentType: DevelopmentType = DevelopmentType.Knight
developmentType should be(DevelopmentType.Knight)
}

it should "be able to be a victory point" in {
val developmentType: DevelopmentType = DevelopmentType.VictoryPoint
developmentType should be(DevelopmentType.VictoryPoint)
}

it should "be able to be a road building" in {
val developmentType: DevelopmentType = DevelopmentType.RoadBuilding
developmentType should be(DevelopmentType.RoadBuilding)
}

it should "be able to be a monopoly" in {
val developmentType: DevelopmentType = DevelopmentType.Monopoly
developmentType should be(DevelopmentType.Monopoly)
}

it should "be able to be a year of plenty" in {
val developmentType: DevelopmentType = DevelopmentType.YearOfPlenty
developmentType should be(DevelopmentType.YearOfPlenty)
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ class ResourceCardTest extends BaseTest:

"A ResourceCard" should "exists" in {
val resourceCard: ResourceCard = ResourceCard(ResourceType.Brick)
resourceCard should not be null
}

it should "have a resource type" in {
Expand Down
8 changes: 1 addition & 7 deletions src/test/scala/scatan/model/resource/ResourceTypeTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,25 @@ import scatan.BaseTest
class ResourceTypeTest extends BaseTest:

"A ResourceType" should "exists" in {
val resourceType: ResourceType = ResourceType.Brick
resourceType should not be null
val resourceType: ResourceType = ResourceType.Wood
}

it should "be able to be a wood" in {
val resourceType: ResourceType = ResourceType.Wood
resourceType should be(ResourceType.Wood)
}

it should "be able to be a brick" in {
val resourceType: ResourceType = ResourceType.Brick
resourceType should be(ResourceType.Brick)
}

it should "be able to be a sheep" in {
val resourceType: ResourceType = ResourceType.Sheep
resourceType should be(ResourceType.Sheep)
}

it should "be able to be a wheat" in {
val resourceType: ResourceType = ResourceType.Wheat
resourceType should be(ResourceType.Wheat)
}

it should "be able to be a rock" in {
val resourceType: ResourceType = ResourceType.Rock
resourceType should be(ResourceType.Rock)
}

0 comments on commit 963a426

Please sign in to comment.