Commit 3665d552 authored by Hallvard Trætteberg's avatar Hallvard Trætteberg
Browse files

Fixed pom and test method names

parent 47169d59
Pipeline #90513 passed with stage
in 1 minute and 6 seconds
......@@ -29,7 +29,7 @@
<version>3.8.1</version>
<configuration>
<encoding>UTF-8</encoding>
<release>13</release>
<release>11</release>
</configuration>
</plugin>
<plugin>
......
......@@ -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");
}
}
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
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment