diff --git a/antipatterns/pom.xml b/antipatterns/pom.xml index c7dfe47b159f4d00252aa8b4fc6957d83d67b664..867a3739225ec34f9c13c5f4aacca64a48714d2b 100644 --- a/antipatterns/pom.xml +++ b/antipatterns/pom.xml @@ -29,7 +29,7 @@ <version>3.8.1</version> <configuration> <encoding>UTF-8</encoding> - <release>13</release> + <release>11</release> </configuration> </plugin> <plugin> diff --git a/antipatterns/src/test/java/antipatterns/DataClassWithValidationTest.java b/antipatterns/src/test/java/antipatterns/DataClassWithValidationTest.java index a497e5a0b02293076827ef6a0573a3920e4f0386..bbad447fedc13ab0fe5f57a08a06b9ac1513d24c 100644 --- a/antipatterns/src/test/java/antipatterns/DataClassWithValidationTest.java +++ b/antipatterns/src/test/java/antipatterns/DataClassWithValidationTest.java @@ -6,15 +6,16 @@ import org.junit.jupiter.api.Test; public class DataClassWithValidationTest { @Test - public void testSetName() { + public void testConstructor() { try { new DataClassWithValidation(" name starting with blank"); Assertions.fail("Should throw IllegalArgumentException"); } catch (final IllegalArgumentException iae) { } catch (final Exception iae) { - Assertions.fail("Should throw IllegalArgumentException"); + Assertions.fail("Should throw IllegalArgumentException, not some other Exception"); } + // completely unncessary try { new DataClassWithValidation("ok name"); } catch (final Exception iae) { @@ -23,12 +24,12 @@ public class DataClassWithValidationTest { } @Test - public void testBetterSetName_invalidName() { + public void testBetterConstructor_invalidName() { Assertions.assertThrows(IllegalArgumentException.class, () -> new DataClassWithValidation(" name starting with blank")); } @Test - public void testBetterSetName_validName() { + public void testBetterConstructor_validName() { new DataClassWithValidation("ok name"); } } diff --git a/lectures/.settings/org.eclipse.buildship.core.prefs b/lectures/.settings/org.eclipse.buildship.core.prefs index e8895216fd3c0c3af4c4522334775f41b7deb42e..ed8080325af75fcb4e0fb9ecc76ff1d3c05e4264 100644 --- a/lectures/.settings/org.eclipse.buildship.core.prefs +++ b/lectures/.settings/org.eclipse.buildship.core.prefs @@ -1,2 +1,13 @@ +arguments= +auto.sync=false +build.scans.enabled=false +connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) connection.project.dir= eclipse.preferences.version=1 +gradle.user.home=/workspace/.gradle +java.home=/home/gitpod/.sdkman/candidates/java/current +jvm.arguments= +offline.mode=false +override.workspace.settings=true +show.console.view=true +show.executions.view=true diff --git a/simpleexample/.settings/org.eclipse.buildship.core.prefs b/simpleexample/.settings/org.eclipse.buildship.core.prefs index e8895216fd3c0c3af4c4522334775f41b7deb42e..ed8080325af75fcb4e0fb9ecc76ff1d3c05e4264 100644 --- a/simpleexample/.settings/org.eclipse.buildship.core.prefs +++ b/simpleexample/.settings/org.eclipse.buildship.core.prefs @@ -1,2 +1,13 @@ +arguments= +auto.sync=false +build.scans.enabled=false +connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) connection.project.dir= eclipse.preferences.version=1 +gradle.user.home=/workspace/.gradle +java.home=/home/gitpod/.sdkman/candidates/java/current +jvm.arguments= +offline.mode=false +override.workspace.settings=true +show.console.view=true +show.executions.view=true