Skip to content

Commit

Permalink
Cleanup: remove redundant "throws Exception"
Browse files Browse the repository at this point in the history
  • Loading branch information
nre-ableton committed Oct 16, 2020
1 parent 420213a commit 88d0c72
Showing 1 changed file with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class PipelineTestHelperTest {
}

@Test
void readFile() throws Exception {
void readFile() {
// given:
def helper = new PipelineTestHelper()
helper.addReadFileMock('test', 'contents')
Expand All @@ -49,7 +49,7 @@ class PipelineTestHelperTest {
}

@Test
void readFileWithMap() throws Exception {
void readFileWithMap() {
// given:
def helper = new PipelineTestHelper()
helper.addReadFileMock('test', 'contents')
Expand All @@ -62,7 +62,7 @@ class PipelineTestHelperTest {
}

@Test
void readFileWithNoMockOutput() throws Exception {
void readFileWithNoMockOutput() {
// given:
def helper = new PipelineTestHelper()

Expand All @@ -74,7 +74,7 @@ class PipelineTestHelperTest {
}

@Test
void runSh() throws Exception {
void runSh() {
// given:
def helper = new PipelineTestHelper()
helper.addShMock('pwd', '/foo/bar', 0)
Expand All @@ -87,7 +87,7 @@ class PipelineTestHelperTest {
}

@Test(expected = Exception)
void runShWithScriptFailure() throws Exception {
void runShWithScriptFailure() {
// given:
def helper = new PipelineTestHelper()
helper.addShMock('evil', '/foo/bar', 666)
Expand All @@ -99,7 +99,7 @@ class PipelineTestHelperTest {
}

@Test
void runShWithStdout() throws Exception {
void runShWithStdout() {
// given:
def helper = new PipelineTestHelper()
helper.addShMock('pwd', '/foo/bar', 0)
Expand All @@ -112,7 +112,7 @@ class PipelineTestHelperTest {
}

@Test
void runShWithReturnCode() throws Exception {
void runShWithReturnCode() {
// given:
def helper = new PipelineTestHelper()
helper.addShMock('pwd', '/foo/bar', 0)
Expand All @@ -125,7 +125,7 @@ class PipelineTestHelperTest {
}

@Test
void runShWithNonZeroReturnCode() throws Exception {
void runShWithNonZeroReturnCode() {
// given:
def helper = new PipelineTestHelper()
helper.addShMock('evil', '/foo/bar', 666)
Expand All @@ -138,7 +138,7 @@ class PipelineTestHelperTest {
}

@Test
void runShWithCallback() throws Exception {
void runShWithCallback() {
// given:
def helper = new PipelineTestHelper()
helper.addShMock('pwd') { script ->
Expand All @@ -153,7 +153,7 @@ class PipelineTestHelperTest {
}

@Test(expected = Exception)
void runShWithCallbackScriptFailure() throws Exception {
void runShWithCallbackScriptFailure() {
// given:
def helper = new PipelineTestHelper()
helper.addShMock('evil') { script ->
Expand All @@ -167,7 +167,7 @@ class PipelineTestHelperTest {
}

@Test
void runShWithCallbackStdout() throws Exception {
void runShWithCallbackStdout() {
// given:
def helper = new PipelineTestHelper()
helper.addShMock('pwd') { script ->
Expand All @@ -182,7 +182,7 @@ class PipelineTestHelperTest {
}

@Test
void runShWithCallbackReturnCode() throws Exception {
void runShWithCallbackReturnCode() {
// given:
def helper = new PipelineTestHelper()
helper.addShMock('pwd') { script ->
Expand All @@ -197,7 +197,7 @@ class PipelineTestHelperTest {
}

@Test
void runShWithCallbackNonZeroReturnCode() throws Exception {
void runShWithCallbackNonZeroReturnCode() {
// given:
def helper = new PipelineTestHelper()
helper.addShMock('pwd') { script ->
Expand All @@ -212,7 +212,7 @@ class PipelineTestHelperTest {
}

@Test(expected = IllegalArgumentException)
void runShWithCallbackOutputNotMap() throws Exception {
void runShWithCallbackOutputNotMap() {
// given:
def helper = new PipelineTestHelper()
helper.addShMock('pwd') { script ->
Expand All @@ -226,7 +226,7 @@ class PipelineTestHelperTest {
}

@Test(expected = IllegalArgumentException)
void runShWithCallbackNoStdoutKey() throws Exception {
void runShWithCallbackNoStdoutKey() {
// given:
def helper = new PipelineTestHelper()
helper.addShMock('pwd') { script ->
Expand All @@ -240,7 +240,7 @@ class PipelineTestHelperTest {
}

@Test(expected = IllegalArgumentException)
void runShWithCallbackNoExitValueKey() throws Exception {
void runShWithCallbackNoExitValueKey() {
// given:
def helper = new PipelineTestHelper()
helper.addShMock('pwd') { script ->
Expand All @@ -254,7 +254,7 @@ class PipelineTestHelperTest {
}

@Test()
void runShWithoutMockOutput() throws Exception {
void runShWithoutMockOutput() {
// given:
def helper = new PipelineTestHelper()

Expand All @@ -266,7 +266,7 @@ class PipelineTestHelperTest {
}

@Test()
void runShWithoutMockOutputAndReturnStatus() throws Exception {
void runShWithoutMockOutputAndReturnStatus() {
// given:
def helper = new PipelineTestHelper()

Expand All @@ -278,7 +278,7 @@ class PipelineTestHelperTest {
}

@Test()
void runShWithoutMockOutputForGitRevParse() throws Exception {
void runShWithoutMockOutputForGitRevParse() {
// given:
def helper = new PipelineTestHelper()

Expand All @@ -290,7 +290,7 @@ class PipelineTestHelperTest {
}

@Test(expected = IllegalArgumentException)
void runShWithBothStatusAndStdout() throws Exception {
void runShWithBothStatusAndStdout() {
// given:
def helper = new PipelineTestHelper()

Expand Down

0 comments on commit 88d0c72

Please sign in to comment.