1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00

fix closure

This commit is contained in:
Christopher Fenner 2018-08-01 08:41:49 +02:00 committed by GitHub
parent 8c7dc44d1d
commit 0db93df011
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -253,7 +253,7 @@ class ConfigurationHelperTest {
public void testWithMandoryWithFalseCondition() {
thrown.none()
new ConfigurationHelper([enforce: false]).withMandatoryProperty('missingKey', null, {c -> return c.enforce})
new ConfigurationHelper([enforce: false]).withMandatoryProperty('missingKey', null, {c -> return c.get('execute')})
}
@Test
@ -261,7 +261,7 @@ class ConfigurationHelperTest {
thrown.expect(IllegalArgumentException)
thrown.expectMessage('ERROR - NO VALUE AVAILABLE FOR missingKey')
new ConfigurationHelper([enforce: true]).withMandatoryProperty('missingKey', null, {c -> return c.execute})
new ConfigurationHelper([enforce: true]).withMandatoryProperty('missingKey', null, {c -> return c.get('execute')})
}
@Test
@ -269,7 +269,7 @@ class ConfigurationHelperTest {
thrown.none()
def config = new ConfigurationHelper([existingKey: 'anyValue', enforce: true])
.withMandatoryProperty('existingKey', null, {c -> return c.execute})
.withMandatoryProperty('existingKey', null, {c -> return c.get('execute')})
.use()
Assert.assertThat(config.size(), is(2))