existingScenarioModel = findScenarioModel( scenarioModel.getDescription() );
if( existingScenarioModel.isPresent() ) {
@@ -192,4 +191,8 @@ public synchronized void setTestClass( Class> testClass ) {
public String getName() {
return name;
}
+
+ public void setName( String name ) {
+ this.name = name;
+ }
}
diff --git a/jgiven-junit5/build.gradle b/jgiven-junit5/build.gradle
new file mode 100644
index 00000000000..bca3ec94102
--- /dev/null
+++ b/jgiven-junit5/build.gradle
@@ -0,0 +1,43 @@
+description = "Module for writing JGiven tests with JUnit 5"
+
+buildscript {
+ repositories {
+ mavenCentral()
+ }
+ dependencies {
+ classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0-M3'
+ }
+}
+
+apply plugin: 'org.junit.platform.gradle.plugin'
+
+sourceCompatibility = 1.8
+targetCompatibility = 1.8
+
+compileJava {
+ options.compilerArgs += '-parameters'
+ options.encoding = 'UTF-8'
+}
+
+junitPlatform {
+ enableStandardTestTask true
+}
+
+afterEvaluate {
+ tasks.getByName('junitPlatformTest') {
+ systemProperty 'jgiven.report.dir', 'build/reports/jgiven/json'
+ systemProperty 'jgiven.report.text', 'false'
+ systemProperty 'org.slf4j.simpleLogger.defaultLogLevel', 'warn'
+ finalizedBy(jgivenHtml5Report)
+ }
+}
+
+dependencies {
+ compile project(':jgiven-core')
+
+ compileOnly 'org.junit.jupiter:junit-jupiter-api:5.0.0-M3'
+
+ testCompile project(':jgiven-html5-report')
+ testCompile 'org.junit.jupiter:junit-jupiter-engine:5.0.0-M3'
+ testCompile 'org.junit.platform:junit-platform-runner:1.0.0-M3'
+}
diff --git a/jgiven-junit5/src/main/java/com/tngtech/jgiven/junit5/JGivenExtension.java b/jgiven-junit5/src/main/java/com/tngtech/jgiven/junit5/JGivenExtension.java
new file mode 100644
index 00000000000..a0c0a26ba16
--- /dev/null
+++ b/jgiven-junit5/src/main/java/com/tngtech/jgiven/junit5/JGivenExtension.java
@@ -0,0 +1,130 @@
+package com.tngtech.jgiven.junit5;
+
+import static com.tngtech.jgiven.report.model.ExecutionStatus.FAILED;
+import static com.tngtech.jgiven.report.model.ExecutionStatus.SUCCESS;
+
+import java.util.ArrayList;
+import java.util.EnumSet;
+import java.util.List;
+
+import com.tngtech.jgiven.config.ConfigurationUtil;
+import com.tngtech.jgiven.impl.Config;
+import org.junit.jupiter.api.Assumptions;
+import org.junit.jupiter.api.Tag;
+import org.junit.jupiter.api.extension.AfterAllCallback;
+import org.junit.jupiter.api.extension.AfterEachCallback;
+import org.junit.jupiter.api.extension.BeforeAllCallback;
+import org.junit.jupiter.api.extension.BeforeEachCallback;
+import org.junit.jupiter.api.extension.ContainerExtensionContext;
+import org.junit.jupiter.api.extension.ExtensionContext;
+import org.junit.jupiter.api.extension.TestExtensionContext;
+import org.junit.jupiter.api.extension.TestInstancePostProcessor;
+import org.junit.jupiter.api.extension.ExtensionContext.Namespace;
+
+import com.tngtech.jgiven.base.ScenarioTestBase;
+import com.tngtech.jgiven.impl.ScenarioBase;
+import com.tngtech.jgiven.impl.ScenarioHolder;
+import com.tngtech.jgiven.report.impl.CommonReportHelper;
+import com.tngtech.jgiven.report.model.NamedArgument;
+import com.tngtech.jgiven.report.model.ReportModel;
+
+/**
+ * This extension enables JGiven for JUnit 5 Tests.
+ *
+ * Just annotate your test class with {@code @ExtendWith( JGivenExtension.class )}
+ *
+ * You can then inject stage classes by using the {@see ScenarioStage} annotation
+ *
+ * As an alternative you can also inherit from one of the following predefined base classes:
+ *
+ * - {@link ScenarioTest}
+ * - {@link SimpleScenarioTest}
+ *
+ *
+ * @see ScenarioTest
+ * @see SimpleScenarioTest
+ */
+public class JGivenExtension implements
+ TestInstancePostProcessor,
+ BeforeAllCallback,
+ AfterAllCallback,
+ BeforeEachCallback,
+ AfterEachCallback {
+
+ private static final Namespace NAMESPACE = Namespace.create( "com.tngtech.jgiven" );
+
+ private static final String REPORT_MODEL = "report-model";
+
+ @Override
+ public void beforeAll( ContainerExtensionContext context ) throws Exception {
+ ReportModel reportModel = new ReportModel();
+ reportModel.setTestClass( context.getTestClass().get() );
+ if( !context.getDisplayName().equals( context.getTestClass().get().getSimpleName() ) ) {
+ reportModel.setName( context.getDisplayName() );
+ }
+ context.getStore( NAMESPACE ).put( REPORT_MODEL, reportModel );
+
+ ConfigurationUtil.getConfiguration(context.getTestClass().get())
+ .configureTag(Tag.class)
+ .description("JUnit 5 Tag")
+ .color("orange");
+ }
+
+ @Override
+ public void afterAll( ContainerExtensionContext context ) throws Exception {
+ new CommonReportHelper().finishReport( (ReportModel) context.getStore( NAMESPACE ).get( REPORT_MODEL ) );
+ }
+
+ @Override
+ public void beforeEach( TestExtensionContext context ) throws Exception {
+ List args = new ArrayList();
+ getScenario().startScenario( context.getTestClass().get(), context.getTestMethod().get(), args );
+
+ }
+
+ @Override
+ public void afterEach( TestExtensionContext context ) throws Exception {
+
+ ScenarioBase scenario = getScenario();
+ try {
+ if( context.getTestException().isPresent() ) {
+ scenario.getExecutor().failed( context.getTestException().get() );
+ }
+ scenario.finished();
+
+ // ignore test when scenario is not implemented
+ Assumptions.assumeTrue( EnumSet.of( SUCCESS, FAILED ).contains( scenario.getScenarioModel().getExecutionStatus() ) );
+
+ } catch( Exception e ) {
+ throw e;
+ } catch( Throwable e ) {
+ throw new RuntimeException( e );
+ } finally {
+ ScenarioHolder.get().removeScenarioOfCurrentThread();
+ }
+
+ }
+
+ private ScenarioBase getScenario() {
+ return ScenarioHolder.get().getScenarioOfCurrentThread();
+ }
+
+ @Override
+ public void postProcessTestInstance( Object testInstance, ExtensionContext context ) throws Exception {
+ ScenarioBase scenario = ScenarioHolder.get().getScenarioOfCurrentThread();
+
+ if( scenario == null ) {
+ if( testInstance instanceof ScenarioTestBase ) {
+ scenario = ( (ScenarioTestBase) testInstance ).getScenario();
+ } else {
+ scenario = new ScenarioBase();
+ }
+ ReportModel reportModel = (ReportModel) context.getStore( NAMESPACE ).get( REPORT_MODEL );
+ scenario.setModel( reportModel );
+ ScenarioHolder.get().setScenarioOfCurrentThread( scenario );
+ }
+
+ scenario.getExecutor().injectStages( testInstance );
+ scenario.getExecutor().readScenarioState( testInstance );
+ }
+}
diff --git a/jgiven-junit5/src/main/java/com/tngtech/jgiven/junit5/ScenarioTest.java b/jgiven-junit5/src/main/java/com/tngtech/jgiven/junit5/ScenarioTest.java
new file mode 100644
index 00000000000..10e497ea843
--- /dev/null
+++ b/jgiven-junit5/src/main/java/com/tngtech/jgiven/junit5/ScenarioTest.java
@@ -0,0 +1,30 @@
+package com.tngtech.jgiven.junit5;
+
+import com.tngtech.jgiven.base.ScenarioTestBase;
+import com.tngtech.jgiven.impl.Scenario;
+import org.junit.jupiter.api.extension.ExtendWith;
+
+
+/**
+ * Convenience test base class for writing JGiven scenarios with JUnit 5.
+ * If you only have one stage class you can also use the {@link SimpleScenarioTest} class.
+ * If you don't want to inherit from any class you can just use the {@link JGivenExtension}
+ * directly.
+ *
+ * @param the GIVEN stage
+ * @param the WHEN stage
+ * @param the THEN stage
+ *
+ * @see JGivenExtension
+ * @see SimpleScenarioTest
+ */
+@ExtendWith( JGivenExtension.class )
+public class ScenarioTest extends ScenarioTestBase {
+
+ private Scenario scenario = createScenario();
+
+ @Override
+ public Scenario getScenario() {
+ return scenario;
+ }
+}
diff --git a/jgiven-junit5/src/main/java/com/tngtech/jgiven/junit5/SimpleScenarioTest.java b/jgiven-junit5/src/main/java/com/tngtech/jgiven/junit5/SimpleScenarioTest.java
new file mode 100644
index 00000000000..9eea7abfd2c
--- /dev/null
+++ b/jgiven-junit5/src/main/java/com/tngtech/jgiven/junit5/SimpleScenarioTest.java
@@ -0,0 +1,19 @@
+package com.tngtech.jgiven.junit5;
+
+import com.tngtech.jgiven.base.SimpleScenarioTestBase;
+import org.junit.jupiter.api.extension.ExtendWith;
+
+import com.tngtech.jgiven.base.ScenarioTestBase;
+import com.tngtech.jgiven.impl.Scenario;
+
+
+@ExtendWith( JGivenExtension.class )
+public class SimpleScenarioTest extends SimpleScenarioTestBase {
+
+ private Scenario scenario = createScenario();
+
+ @Override
+ public Scenario getScenario() {
+ return scenario;
+ }
+}
diff --git a/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/DynamicTestTest.java b/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/DynamicTestTest.java
new file mode 100644
index 00000000000..8c50ef75e40
--- /dev/null
+++ b/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/DynamicTestTest.java
@@ -0,0 +1,31 @@
+package com.tngtech.jgiven.junit5.test;
+
+import com.tngtech.jgiven.junit5.JGivenExtension;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.DynamicTest;
+import org.junit.jupiter.api.TestFactory;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.junit.platform.runner.JUnitPlatform;
+import org.junit.runner.RunWith;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.DynamicTest.dynamicTest;
+
+@ExtendWith(JGivenExtension.class)
+@RunWith( JUnitPlatform.class )
+@DisplayName("Dynamic Tests")
+public class DynamicTestTest {
+
+ @TestFactory
+ Collection dynamicTestsFromCollection() {
+ return Arrays.asList(
+ dynamicTest("1st dynamic test", () -> assertTrue(true)),
+ dynamicTest("2nd dynamic test", () -> assertEquals(4, 2 * 2))
+ );
+ }
+
+}
diff --git a/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/GeneralStage.java b/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/GeneralStage.java
new file mode 100644
index 00000000000..691f4c7b948
--- /dev/null
+++ b/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/GeneralStage.java
@@ -0,0 +1,21 @@
+package com.tngtech.jgiven.junit5.test;
+
+import org.junit.jupiter.api.Assertions;
+
+public class GeneralStage {
+
+ private String someState;
+
+ public void some_state() {
+ someState = "SomeState";
+
+ }
+
+ public void some_action() {
+ Assertions.assertNotNull(someState);
+ }
+
+ public void some_outcome() {
+ Assertions.assertNotNull(someState);
+ }
+}
diff --git a/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/GivenStage.java b/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/GivenStage.java
new file mode 100644
index 00000000000..b49b2e754a3
--- /dev/null
+++ b/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/GivenStage.java
@@ -0,0 +1,15 @@
+package com.tngtech.jgiven.junit5.test;
+
+import com.tngtech.jgiven.annotation.ExpectedScenarioState;
+import com.tngtech.jgiven.annotation.ProvidedScenarioState;
+
+public class GivenStage {
+
+ @ProvidedScenarioState
+ String someState;
+
+ public void some_state() {
+ someState = "Some State";
+ }
+
+}
diff --git a/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/JGiven5ExtensionTest.java b/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/JGiven5ExtensionTest.java
new file mode 100644
index 00000000000..fbd2d95e4d6
--- /dev/null
+++ b/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/JGiven5ExtensionTest.java
@@ -0,0 +1,37 @@
+package com.tngtech.jgiven.junit5.test;
+
+import com.tngtech.jgiven.annotation.Pending;
+import org.junit.jupiter.api.Tag;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+
+import com.tngtech.jgiven.Stage;
+import com.tngtech.jgiven.annotation.ScenarioStage;
+import com.tngtech.jgiven.junit5.JGivenExtension;
+
+@ExtendWith( JGivenExtension.class )
+public class JGiven5ExtensionTest {
+
+ @ScenarioStage
+ GivenStage givenStage;
+
+ @ScenarioStage
+ WhenStage whenStage;
+
+ @ScenarioStage
+ ThenStage thenStage;
+
+ @Test
+ public void JGiven_works_with_JUnit5() {
+ givenStage.some_state();
+ whenStage.some_action();
+ thenStage.some_outcome();
+ }
+
+ @Test
+ @Pending
+ public void Pending_works() {
+ whenStage.some_failing_step();
+ }
+
+}
diff --git a/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/JGiven5ScenarioTest.java b/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/JGiven5ScenarioTest.java
new file mode 100644
index 00000000000..2853acf3bd4
--- /dev/null
+++ b/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/JGiven5ScenarioTest.java
@@ -0,0 +1,19 @@
+package com.tngtech.jgiven.junit5.test;
+
+import com.tngtech.jgiven.junit5.ScenarioTest;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+
+import com.tngtech.jgiven.annotation.ScenarioStage;
+import com.tngtech.jgiven.junit5.JGivenExtension;
+
+public class JGiven5ScenarioTest extends ScenarioTest {
+
+ @Test
+ public void JGiven_works_with_JUnit5() {
+ given().some_state();
+ when().some_action();
+ then().some_outcome();
+ }
+
+}
diff --git a/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/JGiven5SimpleScenarioTest.java b/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/JGiven5SimpleScenarioTest.java
new file mode 100644
index 00000000000..5545f11d9d6
--- /dev/null
+++ b/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/JGiven5SimpleScenarioTest.java
@@ -0,0 +1,15 @@
+package com.tngtech.jgiven.junit5.test;
+
+import com.tngtech.jgiven.junit5.SimpleScenarioTest;
+import org.junit.jupiter.api.Test;
+
+public class JGiven5SimpleScenarioTest extends SimpleScenarioTest {
+
+ @Test
+ public void JGiven_works_with_JUnit5() {
+ given().some_state();
+ when().some_action();
+ then().some_outcome();
+ }
+
+}
diff --git a/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/NestedTest.java b/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/NestedTest.java
new file mode 100644
index 00000000000..bf15062de37
--- /dev/null
+++ b/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/NestedTest.java
@@ -0,0 +1,100 @@
+package com.tngtech.jgiven.junit5.test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Nested;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.junit.platform.runner.JUnitPlatform;
+import org.junit.runner.RunWith;
+
+import com.tngtech.jgiven.annotation.BeforeStage;
+import com.tngtech.jgiven.annotation.ExpectedScenarioState;
+import com.tngtech.jgiven.annotation.ScenarioStage;
+import com.tngtech.jgiven.annotation.ScenarioState;
+import com.tngtech.jgiven.junit5.JGivenExtension;
+
+@RunWith( JUnitPlatform.class )
+@ExtendWith( { JGivenExtension.class } )
+@DisplayName( "@Nested")
+public class NestedTest {
+
+ @ScenarioStage
+ GeneralStage outerStage;
+
+ @ScenarioState
+ String outerState = "Outer State";
+
+ @Nested
+ @DisplayName("1st level nesting")
+ class NestedTestClass {
+
+ @ScenarioStage
+ NestedStage stage;
+
+ @ScenarioState
+ String nestedState = "Nested State";
+
+ @BeforeEach
+ public void background() {
+ stage.some_background();
+ }
+
+ @Test
+ public void nested_classes() {
+ assertThat( outerStage ).as( "outerStage" ).isNotNull();
+ assertThat( stage ).as( "stage" ).isNotNull();
+
+ outerStage.some_state();
+ stage.some_action();
+ stage.some_outcome();
+ }
+
+ @Test
+ public void another_test() {
+
+ }
+
+ @Nested
+ @DisplayName("2nd level nesting")
+ class NestedDeeper {
+ @Test
+ public void deeply_nested_classes() {
+ assertThat( outerStage ).as( "outerStage" ).isNotNull();
+ assertThat( stage ).as( "stage" ).isNotNull();
+
+ outerStage.some_state();
+ stage.some_action();
+ stage.some_outcome();
+ }
+
+ }
+ }
+
+ static class NestedStage {
+ @ExpectedScenarioState
+ String outerState;
+
+ @ExpectedScenarioState
+ String nestedState;
+
+ @BeforeStage
+ void setup() {
+ assertThat( outerState ).as( "outerState" ).isNotNull();
+ assertThat( nestedState ).as( "nestedState" ).isNotNull();
+ }
+
+ public void some_action() {
+
+ }
+
+ public void some_outcome() {}
+
+ public void some_background() {
+
+ }
+ }
+
+}
diff --git a/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/TagTest.java b/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/TagTest.java
new file mode 100644
index 00000000000..47075689814
--- /dev/null
+++ b/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/TagTest.java
@@ -0,0 +1,39 @@
+package com.tngtech.jgiven.junit5.test;
+
+import com.tngtech.jgiven.annotation.JGivenConfiguration;
+import org.junit.jupiter.api.Tag;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+
+import com.tngtech.jgiven.annotation.Pending;
+import com.tngtech.jgiven.annotation.ScenarioStage;
+import com.tngtech.jgiven.junit5.JGivenExtension;
+
+@Tag("Class Tag")
+@ExtendWith( JGivenExtension.class )
+public class TagTest {
+
+ @ScenarioStage
+ GivenStage givenStage;
+
+ @ScenarioStage
+ WhenStage whenStage;
+
+ @ScenarioStage
+ ThenStage thenStage;
+
+ @Test
+ @Tag("Method Tag")
+ public void scenario_with_a_JUnit5_tag() {
+ givenStage.some_state();
+ whenStage.some_action();
+ thenStage.some_outcome();
+ }
+
+ @Test
+ @Pending
+ public void Pending_works() {
+ whenStage.some_failing_step();
+ }
+
+}
diff --git a/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/ThenStage.java b/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/ThenStage.java
new file mode 100644
index 00000000000..7f264518247
--- /dev/null
+++ b/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/ThenStage.java
@@ -0,0 +1,18 @@
+package com.tngtech.jgiven.junit5.test;
+
+import com.tngtech.jgiven.annotation.ExpectedScenarioState;
+import com.tngtech.jgiven.annotation.ProvidedScenarioState;
+import org.junit.jupiter.api.Assertions;
+
+public class ThenStage {
+ @ExpectedScenarioState
+ String someState;
+
+ @ExpectedScenarioState
+ String someResult;
+
+ void some_outcome() {
+ Assertions.assertNotNull(someState);
+ Assertions.assertNotNull(someResult);
+ }
+}
diff --git a/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/WhenStage.java b/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/WhenStage.java
new file mode 100644
index 00000000000..851e3faf2c6
--- /dev/null
+++ b/jgiven-junit5/src/test/java/com/tngtech/jgiven/junit5/test/WhenStage.java
@@ -0,0 +1,23 @@
+package com.tngtech.jgiven.junit5.test;
+
+import com.tngtech.jgiven.annotation.ExpectedScenarioState;
+import com.tngtech.jgiven.annotation.ProvidedScenarioState;
+import org.junit.jupiter.api.Assertions;
+
+public class WhenStage {
+
+ @ExpectedScenarioState
+ String someState;
+
+ @ProvidedScenarioState
+ String someResult;
+
+ void some_action() {
+ Assertions.assertNotNull(someState);
+ someResult = "Some Result";
+ }
+
+ public void some_failing_step() {
+ Assertions.assertTrue(false, "Intentionally failing");
+ }
+}
diff --git a/jgiven-testng/build.gradle b/jgiven-testng/build.gradle
index c798a518f06..d91f9624707 100644
--- a/jgiven-testng/build.gradle
+++ b/jgiven-testng/build.gradle
@@ -5,11 +5,6 @@ dependencies {
compile project(':jgiven-html5-report')
compile(group: 'org.testng', name: 'testng', version: '6.9.12')
testCompile(group: 'org.testng.testng-remote', name: 'testng-remote-dist', version: '1.0.0')
-
- /* This dependency was originally in the Maven provided scope, but the project was not of type war.
- This behavior is not yet supported by Gradle, so this dependency has been converted to a compile dependency.
- Please review and delete this closure when resolved. */
-
}
test.useTestNG() {
diff --git a/jgiven-testng/src/main/java/com/tngtech/jgiven/testng/ScenarioTest.java b/jgiven-testng/src/main/java/com/tngtech/jgiven/testng/ScenarioTest.java
index 05446e11445..180458b1978 100644
--- a/jgiven-testng/src/main/java/com/tngtech/jgiven/testng/ScenarioTest.java
+++ b/jgiven-testng/src/main/java/com/tngtech/jgiven/testng/ScenarioTest.java
@@ -1,5 +1,6 @@
package com.tngtech.jgiven.testng;
+import com.tngtech.jgiven.impl.ScenarioHolder;
import org.testng.annotations.Listeners;
import com.tngtech.jgiven.base.ScenarioTestBase;
diff --git a/jgiven-testng/src/main/java/com/tngtech/jgiven/testng/ScenarioTestListener.java b/jgiven-testng/src/main/java/com/tngtech/jgiven/testng/ScenarioTestListener.java
index bcafd0d0dbe..4f1180e026c 100644
--- a/jgiven-testng/src/main/java/com/tngtech/jgiven/testng/ScenarioTestListener.java
+++ b/jgiven-testng/src/main/java/com/tngtech/jgiven/testng/ScenarioTestListener.java
@@ -7,6 +7,7 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
+import com.tngtech.jgiven.impl.ScenarioHolder;
import org.testng.ITestContext;
import org.testng.ITestListener;
import org.testng.ITestResult;
diff --git a/jgiven-testng/src/main/java/com/tngtech/jgiven/testng/SimpleScenarioTest.java b/jgiven-testng/src/main/java/com/tngtech/jgiven/testng/SimpleScenarioTest.java
index 0f38fa31f72..a4f0e124363 100644
--- a/jgiven-testng/src/main/java/com/tngtech/jgiven/testng/SimpleScenarioTest.java
+++ b/jgiven-testng/src/main/java/com/tngtech/jgiven/testng/SimpleScenarioTest.java
@@ -1,6 +1,7 @@
package com.tngtech.jgiven.testng;
import com.tngtech.jgiven.impl.Scenario;
+import com.tngtech.jgiven.impl.ScenarioHolder;
import org.testng.annotations.Listeners;
import com.tngtech.jgiven.base.SimpleScenarioTestBase;
diff --git a/jgiven-tests/src/main/java/com/tngtech/jgiven/tests/ScenarioTestForTesting.java b/jgiven-tests/src/main/java/com/tngtech/jgiven/tests/ScenarioTestForTesting.java
index 8643e19123d..484a47a3b02 100644
--- a/jgiven-tests/src/main/java/com/tngtech/jgiven/tests/ScenarioTestForTesting.java
+++ b/jgiven-tests/src/main/java/com/tngtech/jgiven/tests/ScenarioTestForTesting.java
@@ -2,7 +2,7 @@
import com.tngtech.jgiven.impl.Scenario;
import com.tngtech.jgiven.junit.ScenarioTest;
-import com.tngtech.jgiven.testng.ScenarioHolder;
+import com.tngtech.jgiven.impl.ScenarioHolder;
public class ScenarioTestForTesting extends ScenarioTest {
@Override
diff --git a/settings.gradle b/settings.gradle
index f02604c2eb0..b1d3772cbdd 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -22,6 +22,10 @@ if (JavaVersion.current().isJava8Compatible() && !release) {
include ':jgiven-java8-tests'
}
+if (JavaVersion.current().isJava8Compatible()) {
+ include ':jgiven-junit5'
+}
+
if (android || release) {
include ':jgiven-android'
}