From 3665d552799f224db5e11f1aa5df39d90d816ee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hallvard=20Tr=C3=A6tteberg?= <hal@ntnu.no> Date: Thu, 29 Oct 2020 10:46:44 +0000 Subject: [PATCH] Fixed pom and test method names --- antipatterns/pom.xml | 2 +- .../antipatterns/DataClassWithValidationTest.java | 9 +++++---- lectures/.settings/org.eclipse.buildship.core.prefs | 11 +++++++++++ .../.settings/org.eclipse.buildship.core.prefs | 11 +++++++++++ 4 files changed, 28 insertions(+), 5 deletions(-) diff --git a/antipatterns/pom.xml b/antipatterns/pom.xml index c7dfe47..867a373 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 a497e5a..bbad447 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 e889521..ed80803 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 e889521..ed80803 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 -- GitLab