-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProcessHapiIntegrationTest.kt
33 lines (29 loc) · 1.17 KB
/
ProcessHapiIntegrationTest.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package de.akquinet.camunda.fhir
import io.camunda.process.test.api.CamundaAssert
import io.camunda.process.test.api.CamundaSpringProcessTest
import io.camunda.zeebe.client.ZeebeClient
import org.junit.jupiter.api.Test
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
@SpringBootTest(properties = ["hapi.fhir.serverbase=http://localhost:8081/"])
@CamundaSpringProcessTest
class ProcessHapiIntegrationTest(@Autowired val client: ZeebeClient): WiremockTestBase() {
@Test
fun testDeploymentAndStartProcessInstance() {
val processInstance = client
.newCreateInstanceCommand()
.bpmnProcessId("camundafhirhapi")
.latestVersion()
.variable("patientId", "example")
.send()
.join()
CamundaAssert.assertThat(processInstance)
.hasVariable("patientId", "example")
.hasVariable("city", "PleasantVille")
.hasVariable("state", "Vic")
.hasVariable("zip", "3999")
.hasVariable("street", "534 Erewhon St")
.hasVariable("use", "HOME")
.isCompleted()
}
}