1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-18 05:18:24 +02:00

Refactor test to address review comments

This commit is contained in:
Sven Merk 2019-04-01 09:01:31 +02:00
parent 3191d8bb26
commit 1b7b1c5214

View File

@ -51,15 +51,9 @@ class WhitesourceRepositoryTest extends BasePiperTest {
@Test
void testMissingConfig() {
def errorCaught = false
try {
new WhitesourceRepository(nullScript, [:])
} catch (e) {
errorCaught = true
assertThat(e, isA(AbortException.class))
assertThat(e.getMessage(), is("Parameter 'whitesource.serviceUrl' must be provided as part of the configuration."))
}
assertThat(errorCaught, is(true))
exception.expect(AbortException)
exception.expectMessage("Parameter 'whitesource.serviceUrl' must be provided as part of the configuration.")
new WhitesourceRepository(nullScript, [:])
}
@Test