Add: Added Testing For "IllegalArgumentException" In "applyEffect" Method In Building8Test.java.
This commit is contained in:
@@ -65,4 +65,15 @@ class Building8Test {
|
||||
|
||||
assertEquals(2 + 4, p.getPrestigeValue());
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Exception Test")
|
||||
void ExceptionTest() {
|
||||
Player p = new Player("test");
|
||||
Building8 b8 = new Building8(1, 1, 1);
|
||||
Building0 b0 = new Building0(1, 1, 1);
|
||||
p.buildingCards.add(b0);
|
||||
|
||||
assertThrows(IllegalArgumentException.class, () -> b8.applyEffect(p));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user