Tibor17 commented on a change in pull request #344:
URL: https://github.com/apache/maven-surefire/pull/344#discussion_r605882185



##########
File path: 
surefire-providers/surefire-junit-platform/src/test/java/org/apache/maven/surefire/junitplatform/JUnitPlatformProviderTest.java
##########
@@ -743,7 +745,8 @@ public void onlyJunitExcludeEngineIsDeclared()
         JUnitPlatformProvider provider = new JUnitPlatformProvider( 
providerParameters );
 
         assertThat( provider.getFilters() ).hasSize( 1 );
-        assertThat( provider.getFilters() ).allMatch( x -> x instanceof 
EngineFilter );
+        assertThat( Arrays.stream( provider.getFilters() ).collect( 
Collectors.toList()) )

Review comment:
       This is unnecessarily complicated.
   I have checked it out in my code, and this works for me:
   `assertThat( provider.getFilters() ).asList().element( 0 ).isInstanceOf( 
EngineFilter.class )`
   Does it work for you too?




-- 
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.

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


Reply via email to