Skip to content

Commit 6b30aba

Browse files
authored
test: improve test coverage throughout (#45)
1 parent 2fecfc1 commit 6b30aba

5 files changed

Lines changed: 484 additions & 41 deletions

File tree

build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,12 @@ dependencies {
100100

101101
testImplementation(platform("org.junit:junit-bom:5.9.1"))
102102
testImplementation("org.junit.jupiter:junit-jupiter")
103+
testImplementation("org.junit-pioneer:junit-pioneer:2.2.0")
103104

104105
testImplementation("org.mockito:mockito-core:5.11.0")
106+
testImplementation("org.mockito:mockito-inline:5.2.0")
107+
testImplementation("org.mockito.kotlin:mockito-kotlin:5.3.1")
108+
105109
implementation(kotlin("stdlib-jdk8"))
106110
}
107111

src/main/java/at/ac/uibk/dps/cirrina/cirrina/Runtime.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ class Runtime(
5454
fun findInstance(stateMachineId: Id): StateMachine? =
5555
stateMachines.firstOrNull { it.stateMachineInstanceId == stateMachineId }
5656

57+
/**
58+
* Get all current state machine instances.
59+
*
60+
* @return A list of state machine instances.
61+
*/
62+
fun getAllInstances(): List<StateMachine> = stateMachines
63+
5764
/**
5865
* Run the specified state machines defined in a CSML project.
5966
*

0 commit comments

Comments
 (0)