eric-milles commented on code in PR #115:
URL: https://github.com/apache/ant-ivy/pull/115#discussion_r2342020248
##########
test/java/org/apache/ivy/ant/IvyDependencyUpdateCheckerTest.java:
##########
@@ -146,12 +142,10 @@ public void testFailure() {
*/
@Test
public void testFailureWithMissingConfigurations() {
- expExc.expect(BuildException.class);
- expExc.expectMessage("unknown");
-
dependencyUpdateChecker.setFile(new
File("test/java/org/apache/ivy/ant/ivy-simple.xml"));
dependencyUpdateChecker.setConf("default,unknown");
- dependencyUpdateChecker.execute();
+ Exception exception = assertThrows(BuildException.class, () ->
dependencyUpdateChecker.execute());
+ assertEquals("requested configuration not found in
apache#resolve-simple;1.0: [ 'unknown' ]", exception.getCause().getMessage());
Review Comment:
This is the message on the cause exception. If you want to test the message
on the top-level exception, it would need to be `assertTrue` ... `contains` or
`endsWith`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]