private List < Runner > addAnnotatedClasses ( final Class < ? > baseClass , final RunnerBuilder builder , final ContractTestMap contractTestMap , final Object baseObj ) throws InitializationError { final List < Runner > runners = new ArrayList < Runner > ( ) ; final ContractImpl impl = getContractImpl ( baseClass ) ; if ( impl != null ) { TestInfo testInfo = contractTestMap . getInfoByTestClass ( impl . value ( ) ) ; if ( testInfo == null ) { testInfo = new SuiteInfo ( baseClass , impl ) ; contractTestMap . add ( testInfo ) ; } if ( ! testInfo . hasErrors ( ) ) { addSpecifiedClasses ( runners , baseClass , builder , contractTestMap , baseObj , testInfo ) ; } // this is not an else since addSpecifiedClasses may add errors to // testInfo. if ( testInfo . hasErrors ( ) ) { runners . add ( new TestInfoErrorRunner ( baseClass , testInfo ) ) ; } } return runners ; }
Add annotated classes to the test