Skip to content

Commit

Permalink
Add proper test in ActivationGroupTest
Browse files Browse the repository at this point in the history
  • Loading branch information
dom-apuliasoft committed Jun 27, 2024
1 parent 0206417 commit c6cb177
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,30 @@ open class ActivationGroupTest : AbstractTest() {
commandLineProgram.singleCall(emptyList(), conf)
}

/**
* Assigned activation group name should be the default from configuration
* */
@Test
fun testUnspecifiedCaller() {
val pgm = " H ACTGRP(*CALLER)\n" +
" C SETON RT"

val conf = Configuration(
jarikoCallback = JarikoCallback(
getActivationGroup = {
_: String, associatedActivationGroup: ActivationGroup? ->
println("associatedActivationGroupName: ${associatedActivationGroup?.assignedName}")
assertEquals(Configuration().defaultActivationGroupName, associatedActivationGroup?.assignedName)
assertEquals(DEFAULT_ACTIVATION_GROUP_NAME, associatedActivationGroup?.assignedName)
null
}
)
)
conf.adaptForTestCase(this)
val commandLineProgram = getProgram(pgm)
commandLineProgram.singleCall(emptyList(), conf)
}

/**
* Assigned activation group name should be from declaration
* */
Expand Down

0 comments on commit c6cb177

Please sign in to comment.