Skip to content

Commit

Permalink
Merge branch 'release/0.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
zambrovski committed Nov 22, 2022
2 parents e3644a6 + 3e09694 commit b4d9cb8
Show file tree
Hide file tree
Showing 10 changed files with 75 additions and 50 deletions.
15 changes: 11 additions & 4 deletions examples/basic-junit5/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.testing</groupId>
<artifactId>camunda-bpm-jgiven-examples</artifactId>
<version>0.3.0</version>
<version>0.4.0</version>
</parent>

<artifactId>camunda-bpm-jgiven-examples-basic-junit5</artifactId>
Expand All @@ -22,11 +22,14 @@
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.bpm.extension.mockito</groupId>
<artifactId>camunda-bpm-mockito</artifactId>
<version>5.16.0</version>
<groupId>org.camunda.community.mockito</groupId>
<artifactId>camunda-platform-7-mockito</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.tngtech.jgiven</groupId>
<artifactId>jgiven-junit5</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-test</artifactId>
Expand Down Expand Up @@ -63,6 +66,10 @@
<groupId>com.tngtech.jgiven</groupId>
<artifactId>jgiven-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import org.springframework.context.annotation.Bean
import java.time.temporal.ChronoUnit
import java.util.*

fun main(args: Array<String>) = runApplication<BasicProcessApplication>(*args).let { Unit }

@EnableProcessApplication
class BasicProcessApplication {
fun main(args: Array<String>) = runApplication<BasicProcessApplication>(*args).let { Unit }

@Bean(APPROVE_REQUEST_TASK_LISTENER)
fun approveRequestTaskListener() = TaskListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<ApprovalProcessActionStage, ApprovalProcessBean>() {
Expand Down
13 changes: 10 additions & 3 deletions examples/basic/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.testing</groupId>
<artifactId>camunda-bpm-jgiven-examples</artifactId>
<version>0.3.0</version>
<version>0.4.0</version>
</parent>

<artifactId>camunda-bpm-jgiven-examples-basic</artifactId>
Expand All @@ -24,7 +24,6 @@
<dependency>
<groupId>org.camunda.community.mockito</groupId>
<artifactId>camunda-platform-7-mockito</artifactId>
<version>6.17.1</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -33,7 +32,11 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<groupId>com.tngtech.jgiven</groupId>
<artifactId>jgiven-junit</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
Expand Down Expand Up @@ -62,6 +65,10 @@
<groupId>com.tngtech.jgiven</groupId>
<artifactId>jgiven-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import org.springframework.context.annotation.Bean
import java.time.temporal.ChronoUnit
import java.util.*

fun main(args: Array<String>) = runApplication<BasicProcessApplication>(*args).let { Unit }

@EnableProcessApplication
class BasicProcessApplication {
fun main(args: Array<String>) = runApplication<BasicProcessApplication>(*args).let { Unit }

@Bean(APPROVE_REQUEST_TASK_LISTENER)
fun approveRequestTaskListener() = TaskListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -21,11 +22,17 @@ import java.util.*
@Deployment(resources = [ApprovalProcessBean.RESOURCE])
open class ApprovalProcessTest : ScenarioTest<ApprovalProcessActionStage, ApprovalProcessActionStage, ApprovalProcessThenStage>() {

@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`() {
Expand Down
11 changes: 11 additions & 0 deletions examples/basic/src/test/resources/camunda.cfg.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

<bean id="processEngineConfiguration"
class="org.camunda.community.process_test_coverage.engine.platform7.ProcessCoverageInMemProcessEngineConfiguration">
<property name="history" value="full"/>
</bean>
</beans>
16 changes: 15 additions & 1 deletion examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.testing</groupId>
<artifactId>camunda-bpm-jgiven-parent</artifactId>
<version>0.3.0</version>
<version>0.4.0</version>
</parent>

<artifactId>camunda-bpm-jgiven-examples</artifactId>
Expand All @@ -15,6 +15,7 @@
<properties>
<spring-boot.version>2.7.5</spring-boot.version>
<camunda-process-test-coverage.version>2.0.0</camunda-process-test-coverage.version>
<camunda-platform-7-mockito.version>6.17.1</camunda-platform-7-mockito.version>
</properties>

<modules>
Expand Down Expand Up @@ -56,6 +57,19 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.camunda.community.mockito</groupId>
<artifactId>camunda-platform-7-mockito</artifactId>
<version>${camunda-platform-7-mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.tngtech.jgiven</groupId>
<artifactId>jgiven-junit5</artifactId>
<version>${jgiven.version}</version>
</dependency>


</dependencies>
</dependencyManagement>

Expand Down
24 changes: 5 additions & 19 deletions extension/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,23 @@
<parent>
<groupId>io.holunda.testing</groupId>
<artifactId>camunda-bpm-jgiven-parent</artifactId>
<version>0.3.0</version>
<version>0.4.0</version>
</parent>

<artifactId>camunda-bpm-jgiven</artifactId>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>com.tngtech.jgiven</groupId>
<artifactId>jgiven-junit</artifactId>
<version>${jgiven.version}</version>
</dependency>
<dependency>
<groupId>com.tngtech.jgiven</groupId>
<artifactId>jgiven-junit5</artifactId>
<version>${jgiven.version}</version>
</dependency>
<dependency>
<groupId>com.tngtech.jgiven</groupId>
<artifactId>jgiven-spring</artifactId>
<version>${jgiven.version}</version>
<groupId>io.toolisticon.testing</groupId>
<artifactId>jgiven-kotlin</artifactId>
</dependency>

<dependency>
<groupId>com.tngtech.jgiven</groupId>
<artifactId>jgiven-html5-report</artifactId>
<artifactId>jgiven-core</artifactId>
<version>${jgiven.version}</version>
</dependency>
<dependency>
<groupId>io.toolisticon.testing</groupId>
<artifactId>jgiven-kotlin</artifactId>
</dependency>

<!-- This is a test library not a BOM, trying to avoid transitive dependencies -->
<dependency>
Expand Down
21 changes: 6 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>io.holunda.testing</groupId>
<artifactId>camunda-bpm-jgiven-parent</artifactId>
<version>0.3.0</version>
<version>0.4.0</version>
<packaging>pom</packaging>


Expand Down Expand Up @@ -45,25 +45,21 @@
<scope>import</scope>
<type>pom</type>
</dependency>

<dependency>
<groupId>com.tngtech.jgiven</groupId>
<artifactId>jgiven-junit</artifactId>
<version>${jgiven.version}</version>
</dependency>
<dependency>
<groupId>com.tngtech.jgiven</groupId>
<artifactId>jgiven-spring</artifactId>
<version>${jgiven.version}</version>
</dependency>
<dependency>
<groupId>com.tngtech.jgiven</groupId>
<artifactId>jgiven-spring-junit4</artifactId>
<artifactId>jgiven-junit5</artifactId>
<version>${jgiven.version}</version>
</dependency>
<dependency>
<groupId>com.tngtech.jgiven</groupId>
<artifactId>jgiven-html5-report</artifactId>
<version>${jgiven.version}</version>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
Expand All @@ -80,11 +76,6 @@
<artifactId>camunda-engine</artifactId>
<version>${camunda.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
</dependency>
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-bpm-assert</artifactId>
Expand Down

0 comments on commit b4d9cb8

Please sign in to comment.