You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/10/18 21:52:28 UTC

[GitHub] [maven-invoker] iofit commented on a diff in pull request #56: [MSHARED-1152] - Migrate tests to JUnit5

iofit commented on code in PR #56:
URL: https://github.com/apache/maven-invoker/pull/56#discussion_r998744020


##########
src/test/java/org/apache/maven/shared/invoker/MavenCommandLineBuilderTest.java:
##########
@@ -857,46 +846,46 @@ public void testShouldInsertActivatedProfiles()
     public void testMvnExecutableFromInvoker()
         throws Exception
     {
-        assumeThat( "Test only works when maven.home is set",
-            System.getProperty( "maven.home" ), is(notNullValue()));
+        assumingThat( Objects.nonNull(System.getProperty( "maven.home" )),
+                () -> System.out.println("Test only works when maven.home is set"));

Review Comment:
   Hi, `assumeThat` doesn't either, it ignores the test, and `assumingThat` does the same, do we want the test to fail if the assumption is not met? If so, that would be an assertion instead and we would have to rewrite expectations. 
   [https://junit.org/junit4/javadoc/4.12/org/junit/Assume.html#assumeThat(java.lang.String,%20T,%20org.hamcrest.Matcher)](https://junit.org/junit4/javadoc/4.12/org/junit/Assume.html#assumeThat(java.lang.String,%20T,%20org.hamcrest.Matcher))



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org