private void testNormalShellScriptGeneration( Platform platform )
throws Exception
{
ScriptGenerator generator = (ScriptGenerator) lookup( ScriptGenerator.ROLE );
Daemon daemon = new Daemon();
daemon.setId( "test" );
daemon.setMainClass( "foo.Bar" );
daemon.setJvmSettings( new JvmSettings() );
daemon.getJvmSettings().setExtraArguments( Arrays.asList( new String[]{"Yo", "dude"} ) );
daemon.setEnvironmentSetupFileName( "setup" );
daemon.setRepositoryName("repo");
File outputDirectory = getTestFile( "target/test-output/normal-shell/" + platform.getName() );
generator.createBinScript( platform.getName(), daemon, outputDirectory );
File expectedFile = getTestFile( PREFIX + "expected-" + daemon.getId() + platform.getBinFileExtension() );
File actualFile = new File( outputDirectory, "bin/" + daemon.getId() + platform.getBinFileExtension() );
assertEquals( FileUtils.fileRead( expectedFile ), FileUtils.fileRead( actualFile ) );
}