Skip to content

Commit 1487251

Browse files
authored
Make asserts meaningful (#232)
1 parent 3421fa9 commit 1487251

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/ChangeLogMojoTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public void testChangeLogWithBadUserDateFormat() throws Exception {
103103

104104
fail("mojo execution must fail.");
105105
} catch (MojoExecutionException e) {
106-
assertTrue(true);
106+
assertNotNull(e.getMessage());
107107
}
108108
}
109109

@@ -126,7 +126,7 @@ public void testChangeLogWithBadConnectionUrl() throws Exception {
126126

127127
fail("mojo execution must fail.");
128128
} catch (MojoExecutionException e) {
129-
assertTrue(true);
129+
assertNotNull(e.getMessage());
130130
}
131131
}
132132
}

maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/CheckoutMojoTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public void testSkipCheckoutWithoutConnectionUrl() throws Exception {
107107

108108
fail("mojo execution must fail.");
109109
} catch (MojoExecutionException e) {
110-
assertTrue(true);
110+
assertNotNull(e.getMessage());
111111
}
112112
}
113113

maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/UntagMojoTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public void testUntag() throws Exception {
102102

103103
fail("mojo execution must fail.");
104104
} catch (MojoExecutionException e) {
105-
assertTrue(true);
105+
assertNotNull(e.getMessage());
106106
}
107107
}
108108

maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/ValidateMojoTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public void testValidateWithInvalidScmUrls() throws Exception {
5252

5353
fail("mojo execution must fail.");
5454
} catch (MojoExecutionException e) {
55-
assertTrue(true);
55+
assertNotNull(e.getMessage());
5656
}
5757
}
5858
}

0 commit comments

Comments
 (0)