From 287e8e591a93c85c47250787415b2a9e88fb09e1 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Wed, 19 Dec 2018 14:34:23 +0100 Subject: [PATCH] Test additional use cases in ExecutionsIntegrationTests Issue: #1356 --- .../engine/ExecutionsIntegrationTests.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/platform-tests/src/test/java/org/junit/platform/testkit/engine/ExecutionsIntegrationTests.java b/platform-tests/src/test/java/org/junit/platform/testkit/engine/ExecutionsIntegrationTests.java index af06cc95f8f6..5b0f01728a85 100644 --- a/platform-tests/src/test/java/org/junit/platform/testkit/engine/ExecutionsIntegrationTests.java +++ b/platform-tests/src/test/java/org/junit/platform/testkit/engine/ExecutionsIntegrationTests.java @@ -36,6 +36,26 @@ void executionsFromSkippedTestEvents() { assertThat(testEvents.skipped().executions().count()).isEqualTo(1); } + @Test + void executionsFromStartedTestEvents() { + Events testEvents = getTestEvents(); + + // We expect 3 if the executions are created BEFORE filtering out "finished" events. + assertThat(testEvents.executions().started().count()).isEqualTo(3); + // We expect 0 if the executions are created AFTER filtering out "finished" events. + assertThat(testEvents.started().executions().count()).isEqualTo(0); + } + + @Test + void executionsFromFinishedTestEvents() { + Events testEvents = getTestEvents(); + + // We expect 3 if the executions are created BEFORE filtering out "started" events. + assertThat(testEvents.executions().finished().count()).isEqualTo(3); + // We expect 0 if the executions are created AFTER filtering out "started" events. + assertThat(testEvents.finished().executions().count()).isEqualTo(0); + } + @Test void executionsFromSucceededTestEvents() { Events testEvents = getTestEvents();