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



##########
File path: 
surefire-providers/surefire-junit-platform/src/test/java/org/apache/maven/surefire/junitplatform/JUnitPlatformProviderTest.java
##########
@@ -891,6 +893,57 @@ public void parsesConfigurationParameters()
         assertEquals( "EOF", provider.getConfigurationParameters().get( "qux" 
) );
     }
 
+    @Test
+    public void shouldFilterTestMethod()
+    {
+        ProviderParameters providerParameters = providerParametersMock();
+        TestListResolver testListResolver = new TestListResolver( 
"**/*Test#test*" );
+        assertFalse( testListResolver.isEmpty() );
+        assertFalse( testListResolver.isWildcard() );
+        TestRequest request = new TestRequest( null, null, testListResolver, 0 
);
+        when( providerParameters.getTestRequest() ).thenReturn( request );
+
+        JUnitPlatformProvider provider = new JUnitPlatformProvider( 
providerParameters );
+
+        assertEquals( provider.getFilters().length, 1 );
+
+        assertThat( provider.getFilters()[0] )
+            .isInstanceOf( TestMethodFilter.class );
+
+        assertThat( (TestListResolver) getInternalState( 
provider.getFilters()[0], "testListResolver" ) )

Review comment:
       yes, it is, IDEA would mark the line red.
   See the generics in the retunred type in `getInternalState()`.




-- 
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-unsubscr...@maven.apache.org

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


Reply via email to