[seam-commits] Seam SVN: r12596 - in modules/drools/trunk: api/src/main/java/org/jboss/seam/drools/qualifiers and 14 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Thu Apr 22 19:14:36 EDT 2010
Author: tsurdilovic
Date: 2010-04-22 19:14:34 -0400 (Thu, 22 Apr 2010)
New Revision: 12596
Added:
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/EntryPoint.java
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/Query.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/DroolsModuleFilter.java
Removed:
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/annotations/EntryPoint.java
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/annotations/Query.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/cep/CEPTestFilter.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/FlowTestFilter.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/interceptors/InterceptorsTestFilter.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kagent/KAgentTestFilter.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestFilter.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestFiler.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/query/QueryTestFilter.java
Modified:
modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/config/DefaultConfig.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/EntryPointProducer.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/QueryResultsProducer.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/annotations/InsertFact.java
modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/interceptor/InsertFactInterceptor.java
modules/drools/trunk/impl/src/main/resources/META-INF/beans.xml
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/cep/CEPTest.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/FlowTest.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/interceptors/InterceptorsTest.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTest.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTest.java
modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/query/QueryTest.java
modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/interceptors/InterceptorsTest-beans.xml
Log:
Changed tests to use the new ShrinkWrap changes. Tests are still failing to what seems Arquillian changes in newest snapshot.
Deleted: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/annotations/EntryPoint.java
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/annotations/EntryPoint.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/annotations/EntryPoint.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright ${year}, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.seam.drools.annotations;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- *
- * @author Tihomir Surdilovic
- */
- at Target( { TYPE, METHOD, FIELD, PARAMETER })
- at Documented
- at Retention(RUNTIME)
- at Inherited
-public @interface EntryPoint {
- String value() default "";
-}
Deleted: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/annotations/Query.java
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/annotations/Query.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/annotations/Query.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright ${year}, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.seam.drools.annotations;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- *
- * @author Tihomir Surdilovic
- */
- at Target( { TYPE, METHOD, FIELD, PARAMETER })
- at Documented
- at Retention(RUNTIME)
- at Inherited
-public @interface Query {
- String value() default "";
-}
Copied: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/EntryPoint.java (from rev 12561, modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/annotations/EntryPoint.java)
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/EntryPoint.java (rev 0)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/EntryPoint.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.drools.qualifiers;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.util.Nonbinding;
+import javax.inject.Qualifier;
+
+/**
+ *
+ * @author Tihomir Surdilovic
+ */
+ at Qualifier
+ at Target( { TYPE, METHOD, FIELD, PARAMETER })
+ at Documented
+ at Retention(RUNTIME)
+ at Inherited
+public @interface EntryPoint {
+ @Nonbinding String value() default "";
+}
Copied: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/Query.java (from rev 12561, modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/annotations/Query.java)
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/Query.java (rev 0)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/Query.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.drools.qualifiers;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.util.Nonbinding;
+import javax.inject.Qualifier;
+
+/**
+ *
+ * @author Tihomir Surdilovic
+ */
+ at Qualifier
+ at Target( { TYPE, METHOD, FIELD, PARAMETER })
+ at Documented
+ at Retention(RUNTIME)
+ at Inherited
+public @interface Query {
+ @Nonbinding String value() default "";
+}
Modified: modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/config/DefaultConfig.java
===================================================================
--- modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/config/DefaultConfig.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/api/src/main/java/org/jboss/seam/drools/qualifiers/config/DefaultConfig.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -28,7 +28,6 @@
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
@@ -42,7 +41,6 @@
@Target( { TYPE, METHOD, FIELD, PARAMETER })
@Documented
@Retention(RUNTIME)
- at Inherited
public @interface DefaultConfig {
}
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/EntryPointProducer.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/EntryPointProducer.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/EntryPointProducer.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -30,7 +30,7 @@
import org.drools.runtime.StatefulKnowledgeSession;
import org.drools.runtime.rule.WorkingMemoryEntryPoint;
-import org.jboss.seam.drools.annotations.EntryPoint;
+import org.jboss.seam.drools.qualifiers.EntryPoint;
import org.jboss.seam.drools.qualifiers.Scanned;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -45,6 +45,7 @@
private static final Logger log = LoggerFactory.getLogger(EntryPointProducer.class);
@Produces
+ @EntryPoint
public WorkingMemoryEntryPoint produceEntryPoint(StatefulKnowledgeSession ksession, InjectionPoint ip) throws Exception
{
String entryPointName = ip.getAnnotated().getAnnotation(EntryPoint.class).value();
@@ -62,6 +63,7 @@
@Produces
@Scanned
+ @EntryPoint
public WorkingMemoryEntryPoint produceScannedEntryPoint(@Scanned StatefulKnowledgeSession ksession, InjectionPoint ip) throws Exception
{
String entryPointName = ip.getAnnotated().getAnnotation(EntryPoint.class).value();
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/QueryResultsProducer.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/QueryResultsProducer.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/QueryResultsProducer.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -29,7 +29,7 @@
import org.drools.runtime.StatefulKnowledgeSession;
import org.drools.runtime.rule.QueryResults;
-import org.jboss.seam.drools.annotations.Query;
+import org.jboss.seam.drools.qualifiers.Query;
import org.jboss.seam.drools.qualifiers.Scanned;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -44,6 +44,7 @@
private static final Logger log = LoggerFactory.getLogger(QueryResultsProducer.class);
@Produces
+ @Query
public QueryResults produceQueryResults(StatefulKnowledgeSession ksession, InjectionPoint ip)
{
String queryName = ip.getAnnotated().getAnnotation(Query.class).value();
@@ -60,6 +61,7 @@
@Produces
@Scanned
+ @Query
public QueryResults produceScannedQueryResults(@Scanned StatefulKnowledgeSession ksession, InjectionPoint ip) {
String queryName = ip.getAnnotated().getAnnotation(Query.class).value();
if (queryName != null && queryName.length() > 0)
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/annotations/InsertFact.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/annotations/InsertFact.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/annotations/InsertFact.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -37,6 +37,7 @@
*
* @author Tihomir Surdilovic
*/
+
@InterceptorBinding
@Target( { TYPE, METHOD })
@Documented
Modified: modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/interceptor/InsertFactInterceptor.java
===================================================================
--- modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/interceptor/InsertFactInterceptor.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/main/java/org/jboss/seam/drools/interceptor/InsertFactInterceptor.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -41,17 +41,17 @@
@AroundInvoke
public Object insertFact(InvocationContext ctx) throws Exception
{
- System.out.println("*******\n\nIN INTERCEPTOR! \n\n ********");
Annotation[] methodAnnotations = ctx.getMethod().getAnnotations();
for(Annotation nextAnnotation : methodAnnotations) {
- if(manager.isQualifier(nextAnnotation.getClass())) {
+ if(manager.isQualifier(nextAnnotation.annotationType())) {
System.out.println("**************** \n\n\nNEXT QUALIFIER: " + nextAnnotation);
}
- if(manager.isInterceptorBinding(nextAnnotation.getClass())) {
+ if(manager.isInterceptorBinding(nextAnnotation.annotationType())) {
System.out.println("**************** \n\n\n\n NEXT INTERCEPTOR BINDING: " + nextAnnotation);
}
}
+
return ctx.proceed();
}
}
Modified: modules/drools/trunk/impl/src/main/resources/META-INF/beans.xml
===================================================================
--- modules/drools/trunk/impl/src/main/resources/META-INF/beans.xml 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/main/resources/META-INF/beans.xml 2010-04-22 23:14:34 UTC (rev 12596)
@@ -331,9 +331,5 @@
</d:RuleResources>
</s:parameters>
</d:DroolsConfig>
-
-
- <interceptors>
- <class>org.jboss.seam.drools.interceptor.InsertFactInterceptor</class>
- </interceptors>
+
</beans>
\ No newline at end of file
Added: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/DroolsModuleFilter.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/DroolsModuleFilter.java (rev 0)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/DroolsModuleFilter.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.drools.test;
+
+import org.jboss.shrinkwrap.api.ArchivePath;
+import org.jboss.shrinkwrap.api.Filter;
+
+public class DroolsModuleFilter implements Filter<ArchivePath>
+{
+ private String testDirName;
+
+ public DroolsModuleFilter(String testDirName) {
+ this.testDirName = testDirName;
+ }
+
+ public boolean include(ArchivePath path)
+ {
+ if(path.get().startsWith("/org/jboss/seam/drools/test")
+ && !(path.get().startsWith("/org/jboss/seam/drools/test/" + testDirName )) ) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+}
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/cep/CEPTest.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/cep/CEPTest.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/cep/CEPTest.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -36,10 +36,11 @@
import org.jboss.arquillian.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.seam.drools.KnowledgeBaseProducer;
-import org.jboss.seam.drools.annotations.EntryPoint;
+import org.jboss.seam.drools.qualifiers.EntryPoint;
import org.jboss.seam.drools.qualifiers.config.CEPPseudoClockConfig;
+import org.jboss.seam.drools.test.DroolsModuleFilter;
import org.jboss.shrinkwrap.api.ArchivePaths;
-import org.jboss.shrinkwrap.api.Archives;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.weld.extensions.resources.ResourceProvider;
import org.junit.Test;
@@ -52,8 +53,8 @@
public static JavaArchive createTestArchive()
{
String pkgPath = CEPTest.class.getPackage().getName().replaceAll("\\.", "/");
- JavaArchive archive = Archives.create("test.jar", JavaArchive.class)
- .addPackages(true, new CEPTestFilter(), KnowledgeBaseProducer.class.getPackage())
+ JavaArchive archive = ShrinkWrap.create("test.jar", JavaArchive.class)
+ .addPackages(true, new DroolsModuleFilter("cep"), KnowledgeBaseProducer.class.getPackage())
.addPackages(true, ResourceProvider.class.getPackage())
.addClass(FireAlarm.class)
.addClass(FireDetected.class)
@@ -65,14 +66,11 @@
//System.out.println(archive.toString(Formatters.VERBOSE));
return archive;
}
-
- @Inject @Default @CEPPseudoClockConfig StatefulKnowledgeSession cepSession;
- @Inject @Default @CEPPseudoClockConfig @EntryPoint("FireDetectionStream") WorkingMemoryEntryPoint fireDetectionStream;
- @Inject @Default @CEPPseudoClockConfig @EntryPoint("SprinklerDetectionStream") WorkingMemoryEntryPoint sprinklerDetectionStream;
-
-
+
@Test
- public void testCEP() {
+ public void testCEP(@Default @CEPPseudoClockConfig StatefulKnowledgeSession cepSession,
+ @Default @CEPPseudoClockConfig @EntryPoint("FireDetectionStream") WorkingMemoryEntryPoint fireDetectionStream,
+ @Default @CEPPseudoClockConfig @EntryPoint("SprinklerDetectionStream") WorkingMemoryEntryPoint sprinklerDetectionStream) {
assertNotNull(cepSession);
assertTrue(cepSession.getId() >= 0);
assertNotNull(fireDetectionStream);
Deleted: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/cep/CEPTestFilter.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/cep/CEPTestFilter.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/cep/CEPTestFilter.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.seam.drools.test.cep;
-
-import org.jboss.shrinkwrap.api.Filter;
-
-public class CEPTestFilter implements Filter<Class<?>>
-{
-
- public boolean include(Class<?> clazz)
- {
- // exclude classes in all other test packages except your own
- if(clazz.getPackage().getName().startsWith("org.jboss.seam.drools.test")
- && !clazz.getPackage().getName().equals(CEPTestFilter.class.getPackage().getName())) {
- return false;
- } else {
- return true;
- }
- }
-
-}
-
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/FlowTest.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/FlowTest.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/FlowTest.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -36,8 +36,9 @@
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.seam.drools.KnowledgeBaseProducer;
import org.jboss.seam.drools.qualifiers.config.DefaultConfig;
+import org.jboss.seam.drools.test.DroolsModuleFilter;
import org.jboss.shrinkwrap.api.ArchivePaths;
-import org.jboss.shrinkwrap.api.Archives;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.weld.extensions.resources.ResourceProvider;
import org.junit.Test;
@@ -50,8 +51,8 @@
public static JavaArchive createTestArchive()
{
String pkgPath = FlowTest.class.getPackage().getName().replaceAll("\\.", "/");
- JavaArchive archive = Archives.create("test.jar", JavaArchive.class)
- .addPackages(true, new FlowTestFilter(), KnowledgeBaseProducer.class.getPackage())
+ JavaArchive archive = ShrinkWrap.create("test.jar", JavaArchive.class)
+ .addPackages(true, new DroolsModuleFilter("flow"), KnowledgeBaseProducer.class.getPackage())
.addPackages(true, ResourceProvider.class.getPackage())
.addClass(Person.class)
.addResource(pkgPath + "/flowtest.drl", ArchivePaths.create("flowtest.drl"))
@@ -63,11 +64,9 @@
return archive;
}
- @Inject @Default @DefaultConfig StatefulKnowledgeSession ksession;
-
@SuppressWarnings("unchecked")
@Test
- public void testFlow() {
+ public void testFlow(@Default @DefaultConfig StatefulKnowledgeSession ksession) {
assertNotNull(ksession);
ksession.setGlobal("errors", new ArrayList<String>());
ksession.insert(new Person("Tihomir", ""));
Deleted: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/FlowTestFilter.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/FlowTestFilter.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/flow/FlowTestFilter.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.seam.drools.test.flow;
-
-import org.jboss.shrinkwrap.api.Filter;
-
-public class FlowTestFilter implements Filter<Class<?>>
-{
-
- public boolean include(Class<?> clazz)
- {
- // exclude classes in all other test packages except your own
- if(clazz.getPackage().getName().startsWith("org.jboss.seam.drools.test")
- && !clazz.getPackage().getName().equals(FlowTestFilter.class.getPackage().getName())) {
- return false;
- } else {
- return true;
- }
- }
-
-}
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/interceptors/InterceptorsTest.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/interceptors/InterceptorsTest.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/interceptors/InterceptorsTest.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -32,8 +32,10 @@
import org.jboss.arquillian.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.seam.drools.KnowledgeBaseProducer;
+import org.jboss.seam.drools.test.DroolsModuleFilter;
import org.jboss.shrinkwrap.api.ArchivePaths;
-import org.jboss.shrinkwrap.api.Archives;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.formatter.Formatters;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.weld.extensions.resources.ResourceProvider;
import org.junit.Test;
@@ -46,21 +48,19 @@
public static JavaArchive createTestArchive()
{
String pkgPath = InterceptorsTest.class.getPackage().getName().replaceAll("\\.", "/");
- JavaArchive archive = Archives.create("test.jar", JavaArchive.class)
- .addPackages(true, new InterceptorsTestFilter(), KnowledgeBaseProducer.class.getPackage())
+ JavaArchive archive = ShrinkWrap.create("test.jar", JavaArchive.class)
+ .addPackages(true, new DroolsModuleFilter("interceptors"), KnowledgeBaseProducer.class.getPackage())
.addPackages(true, ResourceProvider.class.getPackage())
.addClass(Person.class)
.addClass(InterceptorsTestBean.class)
.addResource(pkgPath + "/interceptorstest.drl", ArchivePaths.create("interceptorstest.drl"))
.addManifestResource(pkgPath + "/InterceptorsTest-beans.xml", ArchivePaths.create("beans.xml"));
- //System.out.println(archive.toString(Formatters.VERBOSE));
+ System.out.println(archive.toString(Formatters.VERBOSE));
return archive;
}
- @Inject InterceptorsTestBean ibean;
-
@Test
- public void testInterceptors() {
+ public void testInterceptors(InterceptorsTestBean ibean) {
assertNotNull(ibean);
ibean.getPerson();
Deleted: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/interceptors/InterceptorsTestFilter.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/interceptors/InterceptorsTestFilter.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/interceptors/InterceptorsTestFilter.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.seam.drools.test.interceptors;
-
-import org.jboss.shrinkwrap.api.Filter;
-
-public class InterceptorsTestFilter implements Filter<Class<?>>
-{
-
- public boolean include(Class<?> clazz)
- {
- // exclude classes in all other test packages except your own
- if(clazz.getPackage().getName().startsWith("org.jboss.seam.drools.test")
- && !clazz.getPackage().getName().equals(InterceptorsTestFilter.class.getPackage().getName())) {
- return false;
- } else {
- return true;
- }
- }
-
-}
\ No newline at end of file
Deleted: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kagent/KAgentTestFilter.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kagent/KAgentTestFilter.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kagent/KAgentTestFilter.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -1,27 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.seam.drools.test.kagent;
-
-public class KAgentTestFilter
-{
-
-}
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTest.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTest.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTest.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -32,8 +32,9 @@
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.seam.drools.KnowledgeBaseProducer;
import org.jboss.seam.drools.qualifiers.config.DefaultConfig;
+import org.jboss.seam.drools.test.DroolsModuleFilter;
import org.jboss.shrinkwrap.api.ArchivePaths;
-import org.jboss.shrinkwrap.api.Archives;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.formatter.Formatters;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.weld.extensions.resources.ResourceProvider;
@@ -47,8 +48,8 @@
public static JavaArchive createTestArchive()
{
String pkgPath = KBaseTest.class.getPackage().getName().replaceAll("\\.", "/");
- JavaArchive archive = Archives.create("test.jar", JavaArchive.class)
- .addPackages(true, new KBaseTestFilter(), KnowledgeBaseProducer.class.getPackage())
+ JavaArchive archive = ShrinkWrap.create("test.jar", JavaArchive.class)
+ .addPackages(true, new DroolsModuleFilter("kbase"), KnowledgeBaseProducer.class.getPackage())
.addPackages(true, ResourceProvider.class.getPackage())
.addClass(KBaseTestRules.class)
.addClass(MyKnowledgeBaseEventListener.class)
@@ -60,10 +61,8 @@
return archive;
}
- @Inject @Default @DefaultConfig KnowledgeBase kbase;
-
@Test
- public void testKBase()
+ public void testKBase(@Default @DefaultConfig KnowledgeBase kbase)
{
assertNotNull(kbase);
assertTrue(kbase.getKnowledgePackage("org.jboss.seam.drools.test.kbase").getRules().size() == 3);
Deleted: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestFilter.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestFilter.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/kbase/KBaseTestFilter.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright ${year}, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.seam.drools.test.kbase;
-
-import org.jboss.shrinkwrap.api.Filter;
-
-public class KBaseTestFilter implements Filter<Class<?>>
-{
-
- public boolean include(Class<?> clazz)
- {
- // exclude classes in all other test packages except your own
- if(clazz.getPackage().getName().startsWith("org.jboss.seam.drools.test")
- && !clazz.getPackage().getName().equals(KBaseTestFilter.class.getPackage().getName())) {
- return false;
- } else {
- return true;
- }
- }
-
-}
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTest.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTest.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTest.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -36,8 +36,9 @@
import org.jboss.seam.drools.annotations.InsertFact;
import org.jboss.seam.drools.qualifiers.config.DefaultConfig;
import org.jboss.seam.drools.qualifiers.config.MVELDialectConfig;
+import org.jboss.seam.drools.test.DroolsModuleFilter;
import org.jboss.shrinkwrap.api.ArchivePaths;
-import org.jboss.shrinkwrap.api.Archives;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.weld.extensions.resources.ResourceProvider;
import org.junit.Test;
@@ -50,8 +51,8 @@
public static JavaArchive createTestArchive()
{
String pkgPath = KSessionTest.class.getPackage().getName().replaceAll("\\.", "/");
- JavaArchive archive = Archives.create("test.jar", JavaArchive.class)
- .addPackages(true, new KSessionTestFiler(), KnowledgeBaseProducer.class.getPackage())
+ JavaArchive archive = ShrinkWrap.create("test.jar", JavaArchive.class)
+ .addPackages(true, new DroolsModuleFilter("ksession"), KnowledgeBaseProducer.class.getPackage())
.addPackages(true, ResourceProvider.class.getPackage())
.addClass(KSessionTestRules.class)
.addResource(pkgPath + "/ksessiontest.drl", ArchivePaths.create("ksessiontest.drl"))
@@ -62,12 +63,10 @@
return archive;
}
- @Inject @Default @DefaultConfig StatefulKnowledgeSession ksession;
- @Inject @Default @MVELDialectConfig StatefulKnowledgeSession mvelksession;
- @Inject @Default @MVELDialectConfig StatefulKnowledgeSession mvelksession2;
-
@Test
- public void testKSession()
+ public void testKSession(@Default @DefaultConfig StatefulKnowledgeSession ksession,
+ @Default @MVELDialectConfig StatefulKnowledgeSession mvelksession,
+ @Default @MVELDialectConfig StatefulKnowledgeSession mvelksession2)
{
assertNotNull(ksession);
assertTrue(ksession.getId() >= 0);
Deleted: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestFiler.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestFiler.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/ksession/KSessionTestFiler.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright ${year}, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.seam.drools.test.ksession;
-
-import org.jboss.shrinkwrap.api.Filter;
-
-public class KSessionTestFiler implements Filter<Class<?>>
-{
-
- public boolean include(Class<?> clazz)
- {
- // exclude classes in all other test packages except your own
- if(clazz.getPackage().getName().startsWith("org.jboss.seam.drools.test")
- && !clazz.getPackage().getName().equals(KSessionTestFiler.class.getPackage().getName())) {
- return false;
- } else {
- return true;
- }
- }
-
-}
Modified: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/query/QueryTest.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/query/QueryTest.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/query/QueryTest.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -34,10 +34,11 @@
import org.jboss.arquillian.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.seam.drools.KnowledgeBaseProducer;
-import org.jboss.seam.drools.annotations.Query;
+import org.jboss.seam.drools.qualifiers.Query;
import org.jboss.seam.drools.qualifiers.config.DefaultConfig;
+import org.jboss.seam.drools.test.DroolsModuleFilter;
import org.jboss.shrinkwrap.api.ArchivePaths;
-import org.jboss.shrinkwrap.api.Archives;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.weld.extensions.resources.ResourceProvider;
import org.junit.Test;
@@ -50,8 +51,8 @@
public static JavaArchive createTestArchive()
{
String pkgPath = QueryTest.class.getPackage().getName().replaceAll("\\.", "/");
- JavaArchive archive = Archives.create("test.jar", JavaArchive.class)
- .addPackages(true, new QueryTestFilter(), KnowledgeBaseProducer.class.getPackage())
+ JavaArchive archive = ShrinkWrap.create("test.jar", JavaArchive.class)
+ .addPackages(true, new DroolsModuleFilter("query"), KnowledgeBaseProducer.class.getPackage())
.addPackages(true, ResourceProvider.class.getPackage())
.addClass(Person.class)
.addClass(QueryFactProvider.class)
@@ -63,13 +64,10 @@
return archive;
}
- @Inject @Default @DefaultConfig @Query("number of adults") QueryResults adultsQuery;
- @Inject @Default @DefaultConfig @Query("number of minors") QueryResults minorsQuery;
-
- @Inject @Default @DefaultConfig ExecutionResults executionResults;
-
@Test
- public void testQuery() {
+ public void testQuery(@Default @DefaultConfig @Query("number of adults") QueryResults adultsQuery,
+ @Default @DefaultConfig @Query("number of minors") QueryResults minorsQuery,
+ @Default @DefaultConfig ExecutionResults executionResults) {
assertNotNull(adultsQuery);
assertNotNull(minorsQuery);
assertNotSame(adultsQuery, minorsQuery);
Deleted: modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/query/QueryTestFilter.java
===================================================================
--- modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/query/QueryTestFilter.java 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/java/org/jboss/seam/drools/test/query/QueryTestFilter.java 2010-04-22 23:14:34 UTC (rev 12596)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.seam.drools.test.query;
-
-import org.jboss.shrinkwrap.api.Filter;
-
-public class QueryTestFilter implements Filter<Class<?>>
-{
-
- public boolean include(Class<?> clazz)
- {
- // exclude classes in all other test packages except your own
- if(clazz.getPackage().getName().startsWith("org.jboss.seam.drools.test")
- && !clazz.getPackage().getName().equals(QueryTestFilter.class.getPackage().getName())) {
- return false;
- } else {
- return true;
- }
- }
-
-}
-
Modified: modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/interceptors/InterceptorsTest-beans.xml
===================================================================
--- modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/interceptors/InterceptorsTest-beans.xml 2010-04-22 22:03:11 UTC (rev 12595)
+++ modules/drools/trunk/impl/src/test/resources/org/jboss/seam/drools/test/interceptors/InterceptorsTest-beans.xml 2010-04-22 23:14:34 UTC (rev 12596)
@@ -24,15 +24,15 @@
xmlns:d="urn:java:org.jboss.seam.drools:org.jboss.seam.drools.config"
xmlns:test="urn:java:org.jboss.seam.drools.test.interceptors">
+ <interceptors>
+ <class>org.jboss.seam.drools.interceptor.InsertFactInterceptor</class>
+ </interceptors>
+
<d:DefaultRuleResources>
<s:specializes/>
<d:resources>
<s:value>classpath;interceptorstest.drl;DRL</s:value>
</d:resources>
</d:DefaultRuleResources>
-
- <test:InterceptorsTestBean>
- <s:overrides/>
- </test:InterceptorsTestBean>
-
+
</beans>
More information about the seam-commits
mailing list