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:
parent
3191d8bb26
commit
1b7b1c5214
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user