Skip to content

Commit fd901fe

Browse files
Add negative evidence for EVT-004
1 parent b43ead4 commit fd901fe

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

conformance-test/src/test/java/dev/robocode/tankroyale/bridge/conformance/RoundOutcomeEventsConformanceTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@ void testEVT004_IntegrationPositive_OwnDeathReachesTheDeathHandler() {
4040
+ ", so onDeath was never called (" + outcome.summary() + ")"));
4141
}
4242

43+
@Test
44+
@DisplayName("EVT-004 negative: each destruction reaches onDeath once, not repeatedly")
45+
void testEVT004_IntegrationNegative_DeathHandlerDoesNotRepeatForOneDestruction() {
46+
assertOnBothEngines(ROBOT, (outcome, engine) ->
47+
assertTrue(outcome.countOf("Death!") == configuredRounds(),
48+
() -> "onDeath was reported other than once per destroyed robot on " + engine
49+
+ " (" + outcome.summary() + ")"));
50+
}
51+
4352
@Test
4453
@DisplayName("EVT-012: winning a round reaches onWin on both engines")
4554
void testEVT012_IntegrationPositive_WinningARoundReachesTheWinHandler() {

0 commit comments

Comments
 (0)