@Test @SuppressWarnings( { "checkstyle:methodname", "checkstyle:magicnumber" } ) public void testCreateCommandLine_UseSystemClassLoaderForkOnce_ShouldConstructManifestOnlyJar() throws IOException, SurefireBooterForkException { ForkConfiguration config = getForkConfiguration( basedir, null ); File cpElement = getTempClasspathFile(); List<String> cp = singletonList( cpElement.getAbsolutePath() ); ClasspathConfiguration cpConfig = new ClasspathConfiguration( new Classpath( cp ), emptyClasspath(), emptyClasspath(), true, true ); ClassLoaderConfiguration clc = new ClassLoaderConfiguration( true, true ); StartupConfiguration startup = new StartupConfiguration( "", cpConfig, clc, ALL, Collections.<String[]>emptyList() ); Commandline cli = config.createCommandLine( startup, 1, temporaryFolder() ); String line = StringUtils.join( cli.getCommandline(), " " ); assertTrue( line.contains( "-jar" ) ); }
@Nonnull public abstract OutputStreamFlushableCommandline createCommandLine( @Nonnull StartupConfiguration config, int forkNumber, @Nonnull File dumpLogDirectory ) throws SurefireBooterForkException;
ForkConfiguration { @Nonnull public abstract OutputStreamFlushableCommandline createCommandLine( @Nonnull StartupConfiguration config, int forkNumber, @Nonnull File dumpLogDirectory ) throws SurefireBooterForkException; }
ForkConfiguration { @Nonnull public abstract OutputStreamFlushableCommandline createCommandLine( @Nonnull StartupConfiguration config, int forkNumber, @Nonnull File dumpLogDirectory ) throws SurefireBooterForkException;  }
ForkConfiguration { @Nonnull public abstract OutputStreamFlushableCommandline createCommandLine( @Nonnull StartupConfiguration config, int forkNumber, @Nonnull File dumpLogDirectory ) throws SurefireBooterForkException;  @Nonnull abstract ForkNodeFactory getForkNodeFactory(); @Nonnull abstract File getTempDirectory(); @Nonnull abstract OutputStreamFlushableCommandline createCommandLine( @Nonnull StartupConfiguration config,
                                                                        int forkNumber,
                                                                        @Nonnull File dumpLogDirectory ); }
ForkConfiguration { @Nonnull public abstract OutputStreamFlushableCommandline createCommandLine( @Nonnull StartupConfiguration config, int forkNumber, @Nonnull File dumpLogDirectory ) throws SurefireBooterForkException;  @Nonnull abstract ForkNodeFactory getForkNodeFactory(); @Nonnull abstract File getTempDirectory(); @Nonnull abstract OutputStreamFlushableCommandline createCommandLine( @Nonnull StartupConfiguration config,
                                                                        int forkNumber,
                                                                        @Nonnull File dumpLogDirectory );  }