diff --git a/examples/basic-junit5/pom.xml b/examples/basic-junit5/pom.xml index 80bf700..a421ada 100644 --- a/examples/basic-junit5/pom.xml +++ b/examples/basic-junit5/pom.xml @@ -6,7 +6,7 @@ io.holunda.testing camunda-bpm-jgiven-examples - 0.3.0 + 0.4.0 camunda-bpm-jgiven-examples-basic-junit5 @@ -22,11 +22,14 @@ h2 - org.camunda.bpm.extension.mockito - camunda-bpm-mockito - 5.16.0 + org.camunda.community.mockito + camunda-platform-7-mockito test + + com.tngtech.jgiven + jgiven-junit5 + org.camunda.bpm.springboot camunda-bpm-spring-boot-starter-test @@ -63,6 +66,10 @@ com.tngtech.jgiven jgiven-maven-plugin + + org.springframework.boot + spring-boot-maven-plugin + diff --git a/examples/basic-junit5/src/main/kotlin/io/holunda/testing/examples/basic/BasicProcessApplication.kt b/examples/basic-junit5/src/main/kotlin/io/holunda/testing/examples/basic/BasicProcessApplication.kt index 99f8a84..0d23fb6 100644 --- a/examples/basic-junit5/src/main/kotlin/io/holunda/testing/examples/basic/BasicProcessApplication.kt +++ b/examples/basic-junit5/src/main/kotlin/io/holunda/testing/examples/basic/BasicProcessApplication.kt @@ -8,9 +8,10 @@ import org.springframework.context.annotation.Bean import java.time.temporal.ChronoUnit import java.util.* +fun main(args: Array) = runApplication(*args).let { Unit } + @EnableProcessApplication class BasicProcessApplication { - fun main(args: Array) = runApplication(*args).let { Unit } @Bean(APPROVE_REQUEST_TASK_LISTENER) fun approveRequestTaskListener() = TaskListener { diff --git a/examples/basic-junit5/src/test/kotlin/io/holunda/testing/examples/basic/junit5/ApprovalProcessStages.kt b/examples/basic-junit5/src/test/kotlin/io/holunda/testing/examples/basic/junit5/ApprovalProcessStages.kt index fb5a922..50e95eb 100644 --- a/examples/basic-junit5/src/test/kotlin/io/holunda/testing/examples/basic/junit5/ApprovalProcessStages.kt +++ b/examples/basic-junit5/src/test/kotlin/io/holunda/testing/examples/basic/junit5/ApprovalProcessStages.kt @@ -18,8 +18,8 @@ import org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.externalTask import org.camunda.bpm.engine.test.mock.Mocks import org.camunda.bpm.engine.variable.Variables import org.camunda.bpm.engine.variable.Variables.putValue -import org.camunda.bpm.extension.mockito.CamundaMockito.getJavaDelegateMock -import org.camunda.bpm.extension.mockito.CamundaMockito.registerJavaDelegateMock +import org.camunda.community.mockito.DelegateExpressions.getJavaDelegateMock +import org.camunda.community.mockito.DelegateExpressions.registerJavaDelegateMock @JGivenProcessStage class ApprovalProcessActionStage : ProcessStage() { diff --git a/examples/basic/pom.xml b/examples/basic/pom.xml index 8bf7318..59fc6e5 100644 --- a/examples/basic/pom.xml +++ b/examples/basic/pom.xml @@ -6,7 +6,7 @@ io.holunda.testing camunda-bpm-jgiven-examples - 0.3.0 + 0.4.0 camunda-bpm-jgiven-examples-basic @@ -24,7 +24,6 @@ org.camunda.community.mockito camunda-platform-7-mockito - 6.17.1 test @@ -33,7 +32,11 @@ test - org.camunda.bpm.springboot + com.tngtech.jgiven + jgiven-junit + + + org.camunda.bpm.springboot camunda-bpm-spring-boot-starter-test test @@ -62,6 +65,10 @@ com.tngtech.jgiven jgiven-maven-plugin + + org.springframework.boot + spring-boot-maven-plugin + diff --git a/examples/basic/src/main/kotlin/io/holunda/testing/examples/basic/BasicProcessApplication.kt b/examples/basic/src/main/kotlin/io/holunda/testing/examples/basic/BasicProcessApplication.kt index 99f8a84..0d23fb6 100644 --- a/examples/basic/src/main/kotlin/io/holunda/testing/examples/basic/BasicProcessApplication.kt +++ b/examples/basic/src/main/kotlin/io/holunda/testing/examples/basic/BasicProcessApplication.kt @@ -8,9 +8,10 @@ import org.springframework.context.annotation.Bean import java.time.temporal.ChronoUnit import java.util.* +fun main(args: Array) = runApplication(*args).let { Unit } + @EnableProcessApplication class BasicProcessApplication { - fun main(args: Array) = runApplication(*args).let { Unit } @Bean(APPROVE_REQUEST_TASK_LISTENER) fun approveRequestTaskListener() = TaskListener { diff --git a/examples/basic/src/test/kotlin/io/holunda/testing/examples/basic/ApprovalProcessTest.kt b/examples/basic/src/test/kotlin/io/holunda/testing/examples/basic/ApprovalProcessTest.kt index c22a138..c60a48a 100644 --- a/examples/basic/src/test/kotlin/io/holunda/testing/examples/basic/ApprovalProcessTest.kt +++ b/examples/basic/src/test/kotlin/io/holunda/testing/examples/basic/ApprovalProcessTest.kt @@ -11,7 +11,8 @@ import io.toolisticon.testing.jgiven.WHEN import org.camunda.bpm.engine.test.Deployment import org.camunda.bpm.engine.test.ProcessEngineRule import org.camunda.bpm.engine.variable.Variables.putValue -import org.camunda.bpm.spring.boot.starter.test.helper.StandaloneInMemoryTestConfiguration +import org.camunda.community.process_test_coverage.junit4.platform7.rules.TestCoverageProcessEngineRuleBuilder +import org.junit.ClassRule import org.junit.Rule import org.junit.Test import java.time.Period @@ -21,11 +22,17 @@ import java.util.* @Deployment(resources = [ApprovalProcessBean.RESOURCE]) open class ApprovalProcessTest : ScenarioTest() { - @get: Rule - val rule: ProcessEngineRule = StandaloneInMemoryTestConfiguration().rule() + companion object { + @get: ClassRule + @JvmStatic + val processEngineRule: ProcessEngineRule = TestCoverageProcessEngineRuleBuilder.create().build() + } + + @get:Rule + val localRule: ProcessEngineRule = processEngineRule @ScenarioState - val camunda = rule.processEngine + val camunda = localRule.processEngine @Test fun `should deploy`() { diff --git a/examples/basic/src/test/resources/camunda.cfg.xml b/examples/basic/src/test/resources/camunda.cfg.xml index e69de29..20523f7 100644 --- a/examples/basic/src/test/resources/camunda.cfg.xml +++ b/examples/basic/src/test/resources/camunda.cfg.xml @@ -0,0 +1,11 @@ + + + + + + + + \ No newline at end of file diff --git a/examples/pom.xml b/examples/pom.xml index e84103b..22bb59c 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -6,7 +6,7 @@ io.holunda.testing camunda-bpm-jgiven-parent - 0.3.0 + 0.4.0 camunda-bpm-jgiven-examples @@ -15,6 +15,7 @@ 2.7.5 2.0.0 + 6.17.1 @@ -56,6 +57,19 @@ ${project.version} test + + org.camunda.community.mockito + camunda-platform-7-mockito + ${camunda-platform-7-mockito.version} + test + + + com.tngtech.jgiven + jgiven-junit5 + ${jgiven.version} + + + diff --git a/extension/pom.xml b/extension/pom.xml index b476e4d..9580916 100644 --- a/extension/pom.xml +++ b/extension/pom.xml @@ -6,7 +6,7 @@ io.holunda.testing camunda-bpm-jgiven-parent - 0.3.0 + 0.4.0 camunda-bpm-jgiven @@ -14,29 +14,15 @@ - com.tngtech.jgiven - jgiven-junit - ${jgiven.version} - - - com.tngtech.jgiven - jgiven-junit5 - ${jgiven.version} - - - com.tngtech.jgiven - jgiven-spring - ${jgiven.version} + io.toolisticon.testing + jgiven-kotlin + com.tngtech.jgiven - jgiven-html5-report + jgiven-core ${jgiven.version} - - io.toolisticon.testing - jgiven-kotlin - diff --git a/pom.xml b/pom.xml index 97aa782..6714f9c 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ io.holunda.testing camunda-bpm-jgiven-parent - 0.3.0 + 0.4.0 pom @@ -45,6 +45,7 @@ import pom + com.tngtech.jgiven jgiven-junit @@ -52,18 +53,13 @@ com.tngtech.jgiven - jgiven-spring - ${jgiven.version} - - - com.tngtech.jgiven - jgiven-spring-junit4 + jgiven-junit5 ${jgiven.version} - com.tngtech.jgiven - jgiven-html5-report - ${jgiven.version} + junit + junit + ${junit.version} org.assertj @@ -80,11 +76,6 @@ camunda-engine ${camunda.version} - - junit - junit - ${junit.version} - org.camunda.bpm camunda-bpm-assert