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



##########
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:
       is cast needed?




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


Reply via email to