" notknown : FuBaz " +
"end "
;
KieServices ks = KieServices.Factory.get();
KieFileSystem kfs = ks.newKieFileSystem();
kfs.generateAndWritePomXML( ks.newReleaseId( "test", "foo", "1.0" ) );
KieModuleModel km = ks.newKieModuleModel();
km.newKieBaseModel( "rules" )
.addPackage( "org.drools.compiler.test2" )
.addPackage( "org.drools.compiler.test1" );
kfs.writeKModuleXML( km.toXML() );
KieResources kr = ks.getResources();
Resource r1 = kr.newByteArrayResource( pkg1.getBytes() )
.setResourceType( ResourceType.DRL )
.setSourcePath( "org/drools/compiler/test1/p1.drl" );
Resource r2 = kr.newByteArrayResource( pkg2.getBytes() )
.setResourceType( ResourceType.DRL )
.setSourcePath( "org/drools/compiler/test2/p2.drl" );
kfs.write( r1 );
kfs.write( r2 );
KieBuilder builder = ks.newKieBuilder( kfs );
builder.buildAll();
assertEquals( Collections.emptyList(), builder.getResults().getMessages( Message.Level.ERROR ) );