mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
Merge pull request #82 from alejandraferreirovidal/addTests
improve tests coverage
This commit is contained in:
commit
0510e087b8
@ -15,6 +15,7 @@ class ConfigurationHelperTest {
|
||||
void testGetProperty() {
|
||||
def configuration = new ConfigurationHelper(getConfiguration())
|
||||
Assert.assertEquals('maven:3.2-jdk-8-onbuild', configuration.getConfigProperty('dockerImage'))
|
||||
Assert.assertEquals('maven:3.2-jdk-8-onbuild', configuration.getConfigProperty('dockerImage', 'default'))
|
||||
Assert.assertEquals('default', configuration.getConfigProperty('something', 'default'))
|
||||
Assert.assertTrue(configuration.isPropertyDefined('dockerImage'))
|
||||
Assert.assertFalse(configuration.isPropertyDefined('something'))
|
||||
@ -27,6 +28,12 @@ class ConfigurationHelperTest {
|
||||
Assert.assertFalse(configuration.isPropertyDefined('something'))
|
||||
}
|
||||
|
||||
@Test
|
||||
void testIsPropertyDefinedWithInteger() {
|
||||
def configuration = new ConfigurationHelper([dockerImage: 3])
|
||||
Assert.assertTrue(configuration.isPropertyDefined('dockerImage'))
|
||||
}
|
||||
|
||||
@Test
|
||||
void testGetMandatoryProperty() {
|
||||
def configuration = new ConfigurationHelper(getConfiguration())
|
||||
|
Loading…
Reference in New Issue
Block a user