|
|
@ -13,7 +13,7 @@ public class PlayerTest { |
|
|
|
|
|
|
|
@BeforeEach |
|
|
|
void setup() { |
|
|
|
p = new Player(); |
|
|
|
p = new Player("Rot"); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
@ -22,7 +22,12 @@ public class PlayerTest { |
|
|
|
assertThat(calculatedResult).describedAs("Dice result").isBetween(1,6); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
void testToString() { |
|
|
|
String expectedResult = "Rot"; |
|
|
|
String calculatedResult = p.toString(); |
|
|
|
assertThat(calculatedResult).describedAs("Player Name").isEqualTo(expectedResult); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |