* files.
*/
@Test
public void testPackageConfigWithErrors() throws Exception {
//test the config, no rule assets yet
ServiceImplementation serviceImplementation = getServiceImplementation();
PackageItem pkg = serviceImplementation.getRulesRepository().createPackage("testBuilderPackageConfig",
"x");
DroolsHeader.updateDroolsHeader("import java.util.List",
pkg);
AssetItem func = pkg.addAsset("func1",
"a function");
func.updateFormat(AssetFormats.FUNCTION);
func.updateContent("function void doSomething() { \n System.err.println(List.class.toString()); }");
func.checkin("yeah");
func = pkg.addAsset("func2",
"q");
func.updateFormat(AssetFormats.FUNCTION);
func.updateContent("function void foo() { \nSystem.err.println(42); \n}");
func.checkin("");
AssetItem ass = pkg.addAsset("dsl",
"m");
ass.updateFormat(AssetFormats.DSL);
ass.updateContent("[when]Foo bar=String()");
ass.checkin("");
serviceImplementation.getRulesRepository().save();
//now lets light it up
PackageAssembler assembler = new PackageAssembler(pkg);
assembler.compile();
assertFalse(assembler.hasErrors());