PropertySet ps = new PropertySet();
ps.set( Property.main_MakeBackup, Standard.NO );
ps.set( Property.main_CompileCodeWriter, Standard.NO );
ps.set( Property.main_ExecuteCodeWriter, Standard.NO );
g.setCmdPropertySet( ps );
Template tm = g.generate( FileUtil.findFile( "org/jostraca/test/simple.jtm" ) );
// get full properties
PropertySet mergedps = tm.getMergedPropertySet();
assertEquals( ".jostraca", mergedps.get( Property.main_WorkFolder ) );
// this is how you can get the canonical template script language name
assertEquals( "java", tm.getCodeWriterLang() );
ps = new PropertySet();
ps.set( Property.main_MakeBackup, Standard.NO );
ps.set( Property.main_CompileCodeWriter, Standard.YES );
ps.set( Property.main_ExecuteCodeWriter, Standard.YES );
g.setCmdPropertySet( ps );
tm = g.generate( FileUtil.findFile( "org/jostraca/test/simple.jtm" ) );
// get the codewriter path
assertEquals( ".jostraca\\SimpleWriter.java", tm.getCodeWriterPath().toString() );
// get the codewriter class file / executable file
assertEquals( ".jostraca\\SimpleWriter.class", tm.getCodeWriterExecutablePath().toString() );
assertEquals("[.\\simple.txt]", tm.getSavedFiles().toString() );
}