" @IgnoreMissingAnnotation1 \n" +
"" +
" name : String @IgnoreMissingAnnotation2( noProp = 999 ) \n" +
" end \n ";
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add( new ByteArrayResource( drl.getBytes() ),
ResourceType.DRL );
assertEquals( 0,
kbuilder.getErrors().size() );
String drl2 = "package org.drools.compiler.test;\n " +
"" +
"import " + AnnotationsTest.Annot.class.getCanonicalName() + "; \n" +
"" +
"" +
"declare MissingAnnotationBean \n" +
" @Annot( wrongProp1 = 1 ) \n" +
"" +
" name : String @Annot( wrongProp2 = 2, wrongProp3 = 3 ) \n" +
" end \n ";
KnowledgeBuilder kbuilder2 = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder2.add( new ByteArrayResource( drl2.getBytes() ),
ResourceType.DRL );
assertEquals( 4,
kbuilder2.getErrors().size() );
}