@Test public void testShouldMatchWildCardsInMethodName() { Filter starAtEnd = createMethodFilter( "#test*" ); assertTrue( "match ending with star should run", starAtEnd.shouldRun( testMethod ) ); Filter starAtBeginning = createMethodFilter( "#*Method" ); assertTrue( "match starting with star should run", starAtBeginning.shouldRun( testMethod ) ); Filter starInMiddle = createMethodFilter( "#test*thod" ); assertTrue( "match containing star should run", starInMiddle.shouldRun( testMethod ) ); Filter questionAtEnd = createMethodFilter( "#testMetho?" ); assertTrue( "match ending with question mark should run", questionAtEnd.shouldRun( testMethod ) ); Filter questionAtBeginning = createMethodFilter( "#????Method" ); assertTrue( "match starting with question mark should run", questionAtBeginning.shouldRun( testMethod ) ); Filter questionInMiddle = createMethodFilter( "#testM?thod" ); assertTrue( "match containing question mark should run", questionInMiddle.shouldRun( testMethod ) ); Filter starAndQuestion = createMethodFilter( "#t?st*thod" ); assertTrue( "match containing star and question mark should run", starAndQuestion.shouldRun( testMethod ) ); }
public Filter createMethodFilter( String requestedTestMethod ) { return new MethodFilter( requestedTestMethod ); }
FilterFactory { public Filter createMethodFilter( String requestedTestMethod ) { return new MethodFilter( requestedTestMethod ); } }
FilterFactory { public Filter createMethodFilter( String requestedTestMethod ) { return new MethodFilter( requestedTestMethod ); } FilterFactory( ClassLoader testClassLoader ); }
FilterFactory { public Filter createMethodFilter( String requestedTestMethod ) { return new MethodFilter( requestedTestMethod ); } FilterFactory( ClassLoader testClassLoader ); boolean canCreateGroupFilter( Map<String, String> providerProperties ); Filter createGroupFilter( Map<String, String> providerProperties ); Filter createMethodFilter( String requestedTestMethod ); Filter createMethodFilter( TestListResolver resolver ); Filter createMatchAnyDescriptionFilter( Iterable<Description> descriptions ); Filter and( Filter filter1, Filter filter2 ); }
FilterFactory { public Filter createMethodFilter( String requestedTestMethod ) { return new MethodFilter( requestedTestMethod ); } FilterFactory( ClassLoader testClassLoader ); boolean canCreateGroupFilter( Map<String, String> providerProperties ); Filter createGroupFilter( Map<String, String> providerProperties ); Filter createMethodFilter( String requestedTestMethod ); Filter createMethodFilter( TestListResolver resolver ); Filter createMatchAnyDescriptionFilter( Iterable<Description> descriptions ); Filter and( Filter filter1, Filter filter2 );  }