@Test public void createReportingReporterFactory() { CommonReflector reflector = new CommonReflector( Thread.currentThread().getContextClassLoader() ); DefaultReporterFactory factory = (DefaultReporterFactory) reflector.createReportingReporterFactory( startupReportConfiguration, consoleLogger ); assertThat( factory ) .isNotNull(); StartupReportConfiguration reportConfiguration = getInternalState( factory, "reportConfiguration" ); assertThat( reportConfiguration ) .isNotSameAs( startupReportConfiguration ); assertThat( reportConfiguration.isUseFile() ).isTrue(); assertThat( reportConfiguration.isPrintSummary() ).isTrue(); assertThat( reportConfiguration.getReportFormat() ).isEqualTo( "PLAIN" ); assertThat( reportConfiguration.isRedirectTestOutputToFile() ).isFalse(); assertThat( reportConfiguration.getReportsDirectory() ).isSameAs( reportsDirectory ); assertThat( reportConfiguration.isTrimStackTrace() ).isFalse(); assertThat( reportConfiguration.getReportNameSuffix() ).isNull(); assertThat( reportConfiguration.getStatisticsFile() ).isSameAs( statistics ); assertThat( reportConfiguration.isRequiresRunHistory() ).isFalse(); assertThat( reportConfiguration.getRerunFailingTestsCount() ).isEqualTo( 1 ); assertThat( reportConfiguration.getXsdSchemaLocation() ).isNull(); assertThat( reportConfiguration.getEncoding() ).isEqualTo( UTF_8 ); assertThat( reportConfiguration.isForkMode() ).isFalse(); assertThat( reportConfiguration.getXmlReporter().toString() ) .isEqualTo( xmlReporter.toString() ); assertThat( reportConfiguration.getTestsetReporter().toString() ) .isEqualTo( infoReporter.toString() ); assertThat( reportConfiguration.getConsoleOutputReporter().toString() ) .isEqualTo( consoleOutputReporter.toString() ); }
public Object createReportingReporterFactory( @Nonnull StartupReportConfiguration startupReportConfiguration, @Nonnull ConsoleLogger consoleLogger ) { Class<?>[] args = { this.startupReportConfiguration, this.consoleLogger }; Object src = createStartupReportConfiguration( startupReportConfiguration ); Object logger = createConsoleLogger( consoleLogger, surefireClassLoader ); Object[] params = { src, logger }; return instantiateObject( DefaultReporterFactory.class.getName(), args, params, surefireClassLoader ); }
CommonReflector { public Object createReportingReporterFactory( @Nonnull StartupReportConfiguration startupReportConfiguration, @Nonnull ConsoleLogger consoleLogger ) { Class<?>[] args = { this.startupReportConfiguration, this.consoleLogger }; Object src = createStartupReportConfiguration( startupReportConfiguration ); Object logger = createConsoleLogger( consoleLogger, surefireClassLoader ); Object[] params = { src, logger }; return instantiateObject( DefaultReporterFactory.class.getName(), args, params, surefireClassLoader ); } }
CommonReflector { public Object createReportingReporterFactory( @Nonnull StartupReportConfiguration startupReportConfiguration, @Nonnull ConsoleLogger consoleLogger ) { Class<?>[] args = { this.startupReportConfiguration, this.consoleLogger }; Object src = createStartupReportConfiguration( startupReportConfiguration ); Object logger = createConsoleLogger( consoleLogger, surefireClassLoader ); Object[] params = { src, logger }; return instantiateObject( DefaultReporterFactory.class.getName(), args, params, surefireClassLoader ); } CommonReflector( @Nonnull ClassLoader surefireClassLoader ); }
CommonReflector { public Object createReportingReporterFactory( @Nonnull StartupReportConfiguration startupReportConfiguration, @Nonnull ConsoleLogger consoleLogger ) { Class<?>[] args = { this.startupReportConfiguration, this.consoleLogger }; Object src = createStartupReportConfiguration( startupReportConfiguration ); Object logger = createConsoleLogger( consoleLogger, surefireClassLoader ); Object[] params = { src, logger }; return instantiateObject( DefaultReporterFactory.class.getName(), args, params, surefireClassLoader ); } CommonReflector( @Nonnull ClassLoader surefireClassLoader ); Object createReportingReporterFactory( @Nonnull StartupReportConfiguration startupReportConfiguration,
                                                  @Nonnull ConsoleLogger consoleLogger ); }
CommonReflector { public Object createReportingReporterFactory( @Nonnull StartupReportConfiguration startupReportConfiguration, @Nonnull ConsoleLogger consoleLogger ) { Class<?>[] args = { this.startupReportConfiguration, this.consoleLogger }; Object src = createStartupReportConfiguration( startupReportConfiguration ); Object logger = createConsoleLogger( consoleLogger, surefireClassLoader ); Object[] params = { src, logger }; return instantiateObject( DefaultReporterFactory.class.getName(), args, params, surefireClassLoader ); } CommonReflector( @Nonnull ClassLoader surefireClassLoader ); Object createReportingReporterFactory( @Nonnull StartupReportConfiguration startupReportConfiguration,
                                                  @Nonnull ConsoleLogger consoleLogger );  }