From 20b649d2b9bf582bfac9c7bfbc713ce642332ea8 Mon Sep 17 00:00:00 2001 From: Sabrina Wullschleger Date: Fri, 16 Aug 2024 17:08:16 +0200 Subject: [PATCH] #135: adjust exception assertion to also assert for jar tests --- .../integrationTest/java/ch/so/agi/gretl/jobs/Av2chTest.java | 2 +- .../java/ch/so/agi/gretl/jobs/CsvValidatorTest.java | 2 +- .../src/integrationTest/java/ch/so/agi/gretl/jobs/CurlTest.java | 2 +- .../java/ch/so/agi/gretl/jobs/GpkgValidatorTest.java | 2 +- .../java/ch/so/agi/gretl/jobs/Ili2pgValidateDatasetTest.java | 2 +- .../java/ch/so/agi/gretl/jobs/Ili2pgValidateTest.java | 2 +- .../java/ch/so/agi/gretl/jobs/IliValidatorTest.java | 2 +- .../java/ch/so/agi/gretl/jobs/ShpValidatorTest.java | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/Av2chTest.java b/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/Av2chTest.java index f90767e5..0be8214c 100644 --- a/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/Av2chTest.java +++ b/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/Av2chTest.java @@ -46,7 +46,7 @@ public void transformationFileSet_Ok() throws Exception { public void transformation_Fail() throws Exception { File projectDirectory = new File(System.getProperty("user.dir") + "/src/integrationTest/jobs/Av2chFail"); - assertThrows(AssertionError.class, () -> { + assertThrows(Throwable.class, () -> { IntegrationTestUtil.executeTestRunner(projectDirectory, "transform"); }); } diff --git a/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/CsvValidatorTest.java b/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/CsvValidatorTest.java index 1f1136e9..ee1ccc96 100755 --- a/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/CsvValidatorTest.java +++ b/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/CsvValidatorTest.java @@ -21,7 +21,7 @@ public void validationOk() throws Exception { public void validationFail() { File projectDirectory = new File(System.getProperty("user.dir") + "/src/integrationTest/jobs/CsvValidatorFail"); - assertThrows(AssertionError.class, () -> { + assertThrows(Throwable.class, () -> { IntegrationTestUtil.executeTestRunner(projectDirectory, "validate"); }); } diff --git a/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/CurlTest.java b/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/CurlTest.java index 0406535f..40748c4e 100644 --- a/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/CurlTest.java +++ b/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/CurlTest.java @@ -72,7 +72,7 @@ public void geodienste_Fail() { File projectDirectory = new File(System.getProperty("user.dir") + "/src/integrationTest/jobs/CurlGeodienste"); GradleVariable[] variables = { GradleVariable.newGradleProperty("mockWebServerPort", String.valueOf(mockWebServer.getPort())) }; - assertThrows(AssertionError.class, () -> { + assertThrows(Throwable.class, () -> { IntegrationTestUtil.executeTestRunner(projectDirectory, "uploadData", variables); }); } diff --git a/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/GpkgValidatorTest.java b/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/GpkgValidatorTest.java index 6a166573..6b520a5f 100644 --- a/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/GpkgValidatorTest.java +++ b/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/GpkgValidatorTest.java @@ -21,7 +21,7 @@ public void validationOk() throws Exception { public void validationFail() { File projectDirectory = new File(System.getProperty("user.dir") + "/src/integrationTest/jobs/GpkgValidatorFail"); - assertThrows(AssertionError.class, () -> { + assertThrows(Throwable.class, () -> { IntegrationTestUtil.executeTestRunner(projectDirectory, "validate"); }); } diff --git a/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/Ili2pgValidateDatasetTest.java b/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/Ili2pgValidateDatasetTest.java index c6a3619f..8464c24f 100644 --- a/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/Ili2pgValidateDatasetTest.java +++ b/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/Ili2pgValidateDatasetTest.java @@ -51,7 +51,7 @@ public void validateMultipleDataset_Ok() throws Exception { public void validateData_Fail() throws Exception { File projectDirectory = new File(System.getProperty("user.dir") + "/src/integrationTest/jobs/Ili2pgValidateDatasetFail"); - assertThrows(AssertionError.class, () -> { + assertThrows(Throwable.class, () -> { IntegrationTestUtil.executeTestRunner(projectDirectory, "validate", gradleVariables); }); diff --git a/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/Ili2pgValidateTest.java b/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/Ili2pgValidateTest.java index 8d86bd20..da2ea5eb 100644 --- a/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/Ili2pgValidateTest.java +++ b/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/Ili2pgValidateTest.java @@ -42,7 +42,7 @@ public void validateData_Ok() throws Exception { public void validateData_Fail() throws Exception { File projectDirectory = new File(System.getProperty("user.dir") + "/src/integrationTest/jobs/Ili2pgValidateFail"); - assertThrows(AssertionError.class, () -> { + assertThrows(Throwable.class, () -> { IntegrationTestUtil.executeTestRunner(projectDirectory, "validate", gradleVariables); }); diff --git a/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/IliValidatorTest.java b/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/IliValidatorTest.java index 59c88ca1..79a2228e 100755 --- a/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/IliValidatorTest.java +++ b/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/IliValidatorTest.java @@ -27,7 +27,7 @@ public void validationFileSetOk() throws Exception { public void validationFail() { File projectDirectory = new File(System.getProperty("user.dir") + "/src/integrationTest/jobs/IliValidatorFail"); - assertThrows(AssertionError.class, () -> { + assertThrows(Throwable.class, () -> { IntegrationTestUtil.executeTestRunner(projectDirectory, "validate"); }); } diff --git a/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/ShpValidatorTest.java b/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/ShpValidatorTest.java index 9da12e41..4710728b 100755 --- a/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/ShpValidatorTest.java +++ b/gretl/src/integrationTest/java/ch/so/agi/gretl/jobs/ShpValidatorTest.java @@ -22,7 +22,7 @@ public void validationOk() throws Exception { public void validationFail() { File projectDirectory = new File(System.getProperty("user.dir") + "/src/integrationTest/jobs/ShpValidatorFail"); - assertThrows(AssertionError.class, () -> { + assertThrows(Throwable.class, () -> { IntegrationTestUtil.executeTestRunner(projectDirectory, "validate"); }); }