[jbpm-commits] JBoss JBPM SVN: r6437 - in jbpm4/trunk/modules: distro/src/main/files/install and 23 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Jun 25 21:59:30 EDT 2010


Author: alex.guizar at jboss.com
Date: 2010-06-25 21:59:29 -0400 (Fri, 25 Jun 2010)
New Revision: 6437

Added:
   jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/mail/
   jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/mail/MailTestSetup.java
   jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/
   jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/cal/
   jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/cal/cfg/
   jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/cal/impl/
   jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/mail/
   jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/mail/CustomMailProducerTest.java
   jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/type/
   jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/
   jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/cal/
   jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/cal/cfg/
   jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/cal/impl/
   jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/mail/
   jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/mail/jbpm.cfg.xml
   jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/mail/jbpm.mail.templates.cfg.xml
   jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/type/
   jbpm4/trunk/modules/test-pojo/src/test/
Removed:
   jbpm4/trunk/modules/test-cactus/src/test/java/org/jbpm/test/
   jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custombusinesscalendarcfg/
   jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custombusinesscalendarimpl/
   jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/customtype/
   jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custombusinesscalendarcfg/
   jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custombusinesscalendarimpl/
   jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/customtype/
   jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activity/mail/CustomMailProducerTest.java
   jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activity/mail/MailTestSetup.java
   jbpm4/trunk/modules/test-db/src/test/resources/jbpm.mail.templates.examples.xml
   jbpm4/trunk/modules/test-pojo/src/main/
Modified:
   jbpm4/trunk/modules/distro/src/main/files/examples/build.xml
   jbpm4/trunk/modules/distro/src/main/files/install/build.xml
   jbpm4/trunk/modules/jpdl/src/test/resources/org/jbpm/test/xml/valid.jpdl.xml
   jbpm4/trunk/modules/test-base/pom.xml
   jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/cal/cfg/CustomBusinessCalendarCfgTest.java
   jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/cal/impl/CustomBusinessCalendar.java
   jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/cal/impl/CustomBusinessCalendarImplTest.java
   jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/type/CustomVariableTypeTest.java
   jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/type/Husky.java
   jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/type/HuskyMatcher.java
   jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/type/HuskyVariable.java
   jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/cal/impl/jbpm.cfg.xml
   jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/type/husky.hbm.xml
   jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/type/jbpm.cfg.xml
   jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/type/jbpm.hibernate.cfg.xml
   jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/type/jbpm.variable.types.xml
   jbpm4/trunk/modules/test-db/pom.xml
   jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activity/mail/AttachmentTest.java
   jbpm4/trunk/modules/test-db/src/test/resources/jbpm.cfg.xml
   jbpm4/trunk/modules/test-pojo/.classpath
   jbpm4/trunk/modules/test-pojo/pom.xml
Log:
JBPM-2893: move custom mail producer test from test-db to test-cfg
move test cases in test-pojo from src/main to src/test

Modified: jbpm4/trunk/modules/distro/src/main/files/examples/build.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/examples/build.xml	2010-06-24 19:31:56 UTC (rev 6436)
+++ jbpm4/trunk/modules/distro/src/main/files/examples/build.xml	2010-06-26 01:59:29 UTC (rev 6437)
@@ -1,109 +1,117 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
+<!-- ====================================================================== -->
+<!--  jBPM: Workflow in Java                                                -->
+<!--                                                                        -->
+<!--  Distributable under LGPL license.                                     -->
+<!--  See terms of license at http://www.gnu.org.                           -->
+<!-- ====================================================================== -->
+
+<!-- $Id$ -->
+
 <project name="jbpm.examples">
 
-	<!-- DEVELOPER SPECIFIC CONFIGURATIONS -->
-	<property file="${user.home}/.jbpm4/build.properties" />
+  <!-- DEVELOPER SPECIFIC CONFIGURATIONS -->
+  <property file="${user.home}/.jbpm4/build.properties" />
 
-	<!-- DEFAULT PROPERTY VALUES -->
-	<property name="database" value="hsqldb" />
-	<property name="jbpm.parent.dir" value="../.." />
-	<property name="jbpm.version" value="4.4-SNAPSHOT" />
-	<property name="jboss.version" value="5.0.0.GA" />
-	<property name="jbpm.home" value="${jbpm.parent.dir}/jbpm-${jbpm.version}" />
+  <!-- DEFAULT PROPERTY VALUES -->
+  <property name="database" value="hsqldb" />
+  <property name="jbpm.parent.dir" value="../.." />
+  <property name="jbpm.version" value="4.4-SNAPSHOT" />
+  <property name="jboss.version" value="5.0.0.GA" />
+  <property name="jbpm.home" value="${jbpm.parent.dir}/jbpm-${jbpm.version}" />
 
-	<!-- JDBC PROPERTIES -->
-	<property file="${user.home}/.jbpm4/jdbc/${database}.properties" />
-	<property file="${jbpm.home}/db/jdbc/${database}.properties" />
+  <!-- JDBC PROPERTIES -->
+  <property file="${user.home}/.jbpm4/jdbc/${database}.properties" />
+  <property file="${jbpm.home}/db/jdbc/${database}.properties" />
 
-	<!-- ### LOG PROPERTIES ################################################# -->
-	<target name="log.properties">
-		<echo message="database: ${database}" />
-		<echo message="jdbc.driver........ ${jdbc.driver}" />
-		<echo message="jdbc.url........... ${jdbc.url}" />
-		<echo message="jdbc.username...... ${jdbc.username}" />
-		<echo message="jbpm.version....... ${jbpm.version}" />
-		<echo message="jbpm.home.......... ${jbpm.home}" />
-	</target>
+  <!-- ### LOG PROPERTIES ################################################# -->
+  <target name="log.properties">
+    <echo message="database: ${database}" />
+    <echo message="jdbc.driver........ ${jdbc.driver}" />
+    <echo message="jdbc.url........... ${jdbc.url}" />
+    <echo message="jdbc.username...... ${jdbc.username}" />
+    <echo message="jbpm.version....... ${jbpm.version}" />
+    <echo message="jbpm.home.......... ${jbpm.home}" />
+  </target>
 
-	<target name="jbpm.libs.path">
-		<path id="jbpm.libs.incl.dependencies">
-			<pathelement location="${jbpm.home}/examples/target/classes" />
-			<fileset dir="${jbpm.home}">
-				<include name="jbpm.jar" />
-			</fileset>
-			<fileset dir="${jbpm.home}/lib" />
-		</path>
-	</target>
+  <target name="jbpm.libs.path">
+    <path id="jbpm.libs.incl.dependencies">
+      <pathelement location="${jbpm.home}/examples/target/classes" />
+      <pathelement location="${jbpm.home}/jbpm.jar" />
+      <fileset dir="${jbpm.home}/lib" includes="*.jar" />
+    </path>
+  </target>
 
-	<!-- ### DEPLOY EXAMPLE BUSINESS ARCHIVES ############################### -->
-	<target name="create.and.deploy.examples" 
-		      depends="jbpm.libs.path, examples.jar">
-		<mkdir dir="${jbpm.home}/examples/target" />
-		<copy file="${jbpm.home}/install/src/cfg/hibernate/jdbc/${database}.hibernate.cfg.xml"
-			    tofile="${jbpm.home}/examples/target/classes/jbpm.hibernate.cfg.xml" 
-		      overwrite="true">
-			<filterset filtersfile="${jbpm.home}/install/jdbc/${database}.properties" />
-		</copy>
-		<jar destfile="${jbpm.home}/examples/target/examples.bar">
-			<fileset dir="${jbpm.home}/examples/src">
-				<exclude name="jbpm.cfg.xml" />
-				<exclude name="jbpm.hibernate.cfg.xml" />
-				<exclude name="jbpm.mail.properties" />
-				<exclude name="jbpm.mail.templates.examples.xml" />
-				<exclude name="logging.properties" />
-				<exclude name="org/jbpm/examples/task/swimlane/process.jpdl.xml" />
-				<exclude name="org/jbpm/examples/task/candidates/process.jpdl.xml" />
-				<exclude name="org/jbpm/examples/concurrency/graphbased/process.jpdl.xml" />
-				<exclude name="org/jbpm/examples/timer/repeat/process.jpdl.xml" />
-				<exclude name="org/jbpm/examples/script/text/process.jpdl.xml" />
-				<exclude name="org/jbpm/examples/decision/handler/process.jpdl.xml" />
-				<exclude name="org/jbpm/examples/mail/template/process.jpdl.xml" />
-				<exclude name="org/jbpm/examples/script/expression/process.jpdl.xml" />
-				<exclude name="org/jbpm/examples/task/assignee/process.jpdl.xml" />
-				<exclude name="org/jbpm/examples/mail/inline/process.jpdl.xml" />
-				<exclude name="org/jbpm/examples/mail/template/process.jpdl.xml" />
-				<exclude name="org/jbpm/examples/eventlistener/process.jpdl.xml" />
-				<exclude name="org/jbpm/examples/timer/event/process.jpdl.xml" />
-				<exclude name="org/jbpm/examples/task/assignmenthandler/process.jpdl.xml" />
-				<exclude name="org/jbpm/examples/java/JavaInstantiateTest.java" />	
-				<exclude name="org/jbpm/examples/decision/conditions/process.jpdl.xml" />
-				<exclude name="org/jbpm/examples/decision/expression/process.jpdl.xml" />
-			  <exclude name="org/jbpm/examples/java/process.jpdl.xml" />
-				<exclude name="org/jbpm/examples/task/notification process.jpdl.xml" />
-				<exclude name="org/jbpm/examples/task/reminder process.jpdl.xml" />
+  <!-- ### DEPLOY EXAMPLE BUSINESS ARCHIVES ############################### -->
+  <target name="create.and.deploy.examples" depends="jbpm.libs.path, examples.jar">
+    <mkdir dir="${jbpm.home}/examples/target" />
+    <copy file="${jbpm.home}/install/src/cfg/hibernate/jdbc/${database}.hibernate.cfg.xml"
+          tofile="${jbpm.home}/examples/target/classes/jbpm.hibernate.cfg.xml"
+          overwrite="true">
+      <filterset filtersfile="${jbpm.home}/install/jdbc/${database}.properties" />
+    </copy>
+    <jar destfile="${jbpm.home}/examples/target/examples.bar">
+      <fileset dir="${jbpm.home}/examples/src">
+        <exclude name="jbpm.cfg.xml" />
+        <exclude name="jbpm.hibernate.cfg.xml" />
+        <exclude name="jbpm.mail.properties" />
+        <exclude name="jbpm.mail.templates.examples.xml" />
+        <exclude name="logging.properties" />
+        <exclude name="org/jbpm/examples/task/swimlane/process.jpdl.xml" />
+        <exclude name="org/jbpm/examples/task/candidates/process.jpdl.xml" />
+        <exclude name="org/jbpm/examples/concurrency/graphbased/process.jpdl.xml" />
+        <exclude name="org/jbpm/examples/timer/repeat/process.jpdl.xml" />
+        <exclude name="org/jbpm/examples/script/text/process.jpdl.xml" />
+        <exclude name="org/jbpm/examples/decision/handler/process.jpdl.xml" />
+        <exclude name="org/jbpm/examples/mail/template/process.jpdl.xml" />
+        <exclude name="org/jbpm/examples/script/expression/process.jpdl.xml" />
+        <exclude name="org/jbpm/examples/task/assignee/process.jpdl.xml" />
+        <exclude name="org/jbpm/examples/mail/inline/process.jpdl.xml" />
+        <exclude name="org/jbpm/examples/mail/template/process.jpdl.xml" />
+        <exclude name="org/jbpm/examples/eventlistener/process.jpdl.xml" />
+        <exclude name="org/jbpm/examples/timer/event/process.jpdl.xml" />
+        <exclude name="org/jbpm/examples/task/assignmenthandler/process.jpdl.xml" />
+        <exclude name="org/jbpm/examples/java/JavaInstantiateTest.java" />
+        <exclude name="org/jbpm/examples/decision/conditions/process.jpdl.xml" />
+        <exclude name="org/jbpm/examples/decision/expression/process.jpdl.xml" />
+        <exclude name="org/jbpm/examples/java/process.jpdl.xml" />
+        <exclude name="org/jbpm/examples/task/notification process.jpdl.xml" />
+        <exclude name="org/jbpm/examples/task/reminder process.jpdl.xml" />
         <exclude name="org/jbpm/examples/rulesdecision/process.jpdl.xml" />
-				<exclude name="org/jbpm/examples/task/notification/process.jpdl.xml" />
-				<exclude name="org/jbpm/examples/task/reminder/process.jpdl.xml" />
-				<exclude name="org/jbpm/examples/bpmn/event/terminateend/terminate_end_event.bpmn.xml" />
-				<exclude name="org/jbpm/examples/bpmn/gateway/exclusive/exclusive_gateway.bpmn.xml" />
-				<exclude name="org/jbpm/examples/bpmn/gateway/exclusive/exclusive_gateway_default_seq_flow.bpmn.xml" />
-				<exclude name="org/jbpm/examples/bpmn/gateway/parallel/parallel_gateway.bpmn.xml" />
-				<exclude name="org/jbpm/examples/bpmn/task/service/service_task_java.bpmn.xml" />
-				<exclude name="org/jbpm/examples/bpmn/task/usertask/user_task_human_performer_variable.bpmn.xml" />
-				<exclude name="org/jbpm/examples/bpmn/task/script/script_task.bpmn.xml" />
-			</fileset>
-		</jar>
-		<taskdef name="jbpm-deploy" classname="org.jbpm.pvm.internal.ant.JbpmDeployTask" classpathref="jbpm.libs.incl.dependencies" />
-		<jbpm-deploy file="${jbpm.home}/examples/target/examples.bar" />
-	</target>
+        <exclude name="org/jbpm/examples/task/notification/process.jpdl.xml" />
+        <exclude name="org/jbpm/examples/task/reminder/process.jpdl.xml" />
+        <exclude name="org/jbpm/examples/bpmn/event/terminateend/terminate_end_event.bpmn.xml" />
+        <exclude name="org/jbpm/examples/bpmn/gateway/exclusive/exclusive_gateway.bpmn.xml" />
+        <exclude name="org/jbpm/examples/bpmn/gateway/exclusive/exclusive_gateway_default_seq_flow.bpmn.xml" />
+        <exclude name="org/jbpm/examples/bpmn/gateway/parallel/parallel_gateway.bpmn.xml" />
+        <exclude name="org/jbpm/examples/bpmn/task/service/service_task_java.bpmn.xml" />
+        <exclude name="org/jbpm/examples/bpmn/task/usertask/user_task_human_performer_variable.bpmn.xml" />
+        <exclude name="org/jbpm/examples/bpmn/task/script/script_task.bpmn.xml" />
+      </fileset>
+    </jar>
+    <taskdef name="jbpm-deploy"
+             classname="org.jbpm.pvm.internal.ant.JbpmDeployTask"
+             classpathref="jbpm.libs.incl.dependencies" />
+    <jbpm-deploy file="${jbpm.home}/examples/target/examples.bar" />
+  </target>
 
-	<target name="examples.jar" depends="jbpm.libs.path">
-		<mkdir dir="${jbpm.home}/examples/target/classes" />
-		<javac srcdir="${jbpm.home}/examples/src"
+  <target name="examples.jar" depends="jbpm.libs.path">
+    <mkdir dir="${jbpm.home}/examples/target/classes" />
+    <javac srcdir="${jbpm.home}/examples/src"
            destdir="${jbpm.home}/examples/target/classes"
-			     source="1.5"
+           source="1.5"
            classpathref="jbpm.libs.incl.dependencies" />
-		<copy todir="${jbpm.home}/examples/target/classes">
-			<fileset dir="${jbpm.home}/examples/src">
-				<exclude name="**/*.java" />
-			</fileset>
-		</copy>
-		<jar destfile="${jbpm.home}/examples/target/examples.jar" >
-			<fileset dir="${jbpm.home}/examples/target/classes">
-				<include name="**/*.class" />
-			</fileset>
-		</jar>
-	</target>
+    <copy todir="${jbpm.home}/examples/target/classes">
+      <fileset dir="${jbpm.home}/examples/src">
+        <exclude name="**/*.java" />
+      </fileset>
+    </copy>
+    <jar destfile="${jbpm.home}/examples/target/examples.jar">
+      <fileset dir="${jbpm.home}/examples/target/classes">
+        <include name="**/*.class" />
+      </fileset>
+    </jar>
+  </target>
 
 </project>


Property changes on: jbpm4/trunk/modules/distro/src/main/files/examples/build.xml
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: jbpm4/trunk/modules/distro/src/main/files/install/build.xml
===================================================================
--- jbpm4/trunk/modules/distro/src/main/files/install/build.xml	2010-06-24 19:31:56 UTC (rev 6436)
+++ jbpm4/trunk/modules/distro/src/main/files/install/build.xml	2010-06-26 01:59:29 UTC (rev 6437)
@@ -1,4 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ====================================================================== -->
+<!--  jBPM: Workflow in Java                                                -->
+<!--                                                                        -->
+<!--  Distributable under LGPL license.                                     -->
+<!--  See terms of license at http://www.gnu.org.                           -->
+<!-- ====================================================================== -->
+
+<!-- $Id$ -->
+
 <project name="jbpm.install">
 
   <!-- DEVELOPER SPECIFIC CONFIGURATIONS -->


Property changes on: jbpm4/trunk/modules/distro/src/main/files/install/build.xml
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: jbpm4/trunk/modules/jpdl/src/test/resources/org/jbpm/test/xml/valid.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/jpdl/src/test/resources/org/jbpm/test/xml/valid.jpdl.xml	2010-06-24 19:31:56 UTC (rev 6436)
+++ jbpm4/trunk/modules/jpdl/src/test/resources/org/jbpm/test/xml/valid.jpdl.xml	2010-06-26 01:59:29 UTC (rev 6437)
@@ -2,21 +2,21 @@
 
 <process name="Purchase order" xmlns="http://jbpm.org/4.3/jpdl">
 
-  <start>
+  <start g="46,33,80,40">
     <transition to="a" />
   </start>
 
-  <state name="a">
-    <transition name="Supplier ok" to="b" />
+  <state name="a" g="169,36,80,40">
+    <transition name="Supplier ok" to="b" g="-85,-23"/>
   </state>
 
-  <state name="b">
-    <transition name="nok" to="Error" />
-    <transition name="ok" to="Completed" />
-  </state >
+  <state name="b" g="169,145,80,40">
+    <transition name="nok" to="Error" g="-31,-23"/>
+    <transition name="ok" to="Completed" g="-22,-23"/>
+  </state>
 
-  <end name="Completed" />
+  <end name="Completed" g="350,142,80,40"/>
 
-  <end name="Error" />
+  <end name="Error" g="186,253,80,40"/>
 
 </process>

Modified: jbpm4/trunk/modules/test-base/pom.xml
===================================================================
--- jbpm4/trunk/modules/test-base/pom.xml	2010-06-24 19:31:56 UTC (rev 6436)
+++ jbpm4/trunk/modules/test-base/pom.xml	2010-06-26 01:59:29 UTC (rev 6437)
@@ -56,6 +56,7 @@
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.slf4j</groupId>
@@ -93,5 +94,9 @@
         </exclusion>
       </exclusions>
     </dependency>
+    <dependency>
+      <groupId>org.subethamail</groupId>
+      <artifactId>subethasmtp-wiser</artifactId>
+    </dependency>
   </dependencies>
 </project>
\ No newline at end of file

Copied: jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/mail/MailTestSetup.java (from rev 6436, jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activity/mail/MailTestSetup.java)
===================================================================
--- jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/mail/MailTestSetup.java	                        (rev 0)
+++ jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/mail/MailTestSetup.java	2010-06-26 01:59:29 UTC (rev 6437)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * 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.jbpm.test.mail;
+
+import org.subethamail.wiser.Wiser;
+
+import junit.extensions.TestSetup;
+import junit.framework.TestSuite;
+
+/**
+ * @author Alejandro Guizar
+ */
+public class MailTestSetup extends TestSetup {
+
+  private final Wiser wiser;
+
+  public MailTestSetup(Class<?> testClass, Wiser wiser) {
+    super(new TestSuite(testClass));
+    this.wiser = wiser;
+  }
+
+  public Wiser getWiser() {
+    return wiser;
+  }
+
+  @Override
+  protected void setUp() throws Exception {
+    wiser.setPort(2525);
+    wiser.start();
+  }
+
+  @Override
+  protected void tearDown() throws Exception {
+    wiser.stop();
+  }
+
+}

Copied: jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/cal/cfg (from rev 6436, jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custombusinesscalendarcfg)

Modified: jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/cal/cfg/CustomBusinessCalendarCfgTest.java
===================================================================
--- jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custombusinesscalendarcfg/CustomBusinessCalendarCfgTest.java	2010-06-24 19:31:56 UTC (rev 6436)
+++ jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/cal/cfg/CustomBusinessCalendarCfgTest.java	2010-06-26 01:59:29 UTC (rev 6437)
@@ -19,7 +19,7 @@
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */
-package org.jbpm.test.custombusinesscalendarcfg;
+package org.jbpm.test.custom.cal.cfg;
 
 import java.util.Calendar;
 import java.util.Date;

Copied: jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/cal/impl (from rev 6436, jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custombusinesscalendarimpl)

Modified: jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/cal/impl/CustomBusinessCalendar.java
===================================================================
--- jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custombusinesscalendarimpl/CustomBusinessCalendar.java	2010-06-24 19:31:56 UTC (rev 6436)
+++ jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/cal/impl/CustomBusinessCalendar.java	2010-06-26 01:59:29 UTC (rev 6437)
@@ -19,7 +19,7 @@
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */
-package org.jbpm.test.custombusinesscalendarimpl;
+package org.jbpm.test.custom.cal.impl;
 
 import java.util.Calendar;
 import java.util.Date;

Modified: jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/cal/impl/CustomBusinessCalendarImplTest.java
===================================================================
--- jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custombusinesscalendarimpl/CustomBusinessCalendarImplTest.java	2010-06-24 19:31:56 UTC (rev 6436)
+++ jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/cal/impl/CustomBusinessCalendarImplTest.java	2010-06-26 01:59:29 UTC (rev 6437)
@@ -19,7 +19,7 @@
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */
-package org.jbpm.test.custombusinesscalendarimpl;
+package org.jbpm.test.custom.cal.impl;
 
 import java.util.Calendar;
 import java.util.Date;

Copied: jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/mail/CustomMailProducerTest.java (from rev 6436, jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activity/mail/CustomMailProducerTest.java)
===================================================================
--- jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/mail/CustomMailProducerTest.java	                        (rev 0)
+++ jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/mail/CustomMailProducerTest.java	2010-06-26 01:59:29 UTC (rev 6437)
@@ -0,0 +1,158 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * 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.jbpm.test.custom.mail;
+
+import java.util.Calendar;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.mail.Message;
+import javax.mail.MessagingException;
+import javax.mail.Message.RecipientType;
+
+import org.subethamail.wiser.Wiser;
+import org.subethamail.wiser.WiserMessage;
+
+import org.jbpm.api.Execution;
+import org.jbpm.api.ProcessInstance;
+import org.jbpm.api.identity.Group;
+import org.jbpm.pvm.internal.email.impl.MailProducerImpl;
+import org.jbpm.pvm.internal.email.impl.MailTemplateRegistry;
+import org.jbpm.pvm.internal.email.spi.AddressResolver;
+import org.jbpm.pvm.internal.env.EnvironmentImpl;
+import org.jbpm.pvm.internal.identity.spi.IdentitySession;
+import org.jbpm.test.JbpmCustomCfgTestCase;
+
+/**
+ * @author Alejandro Guizar
+ */
+public class CustomMailProducerTest extends JbpmCustomCfgTestCase {
+
+  private Wiser wiser = new Wiser();
+
+  protected void setUp() throws Exception {
+    super.setUp();
+    // create actors
+    identityService.createUser("bb", "Big Brother", null, "bb at oceania");
+    identityService.createUser("obrien", null, "O'Brien", "obrien at miniluv");
+    identityService.createUser("charr", null, "Charrington", "charr at miniluv");
+    identityService.createGroup("thinkpol");
+    identityService.createGroup("innerparty");
+    identityService.createMembership("obrien", "innerparty");
+    identityService.createMembership("charr", "thinkpol");
+    identityService.createMembership("obrien", "thinkpol");
+    // start mail server
+    wiser.setPort(2525);
+    wiser.start();
+  }
+
+  protected void tearDown() throws Exception {
+    // stop mail server
+    wiser.stop();
+    // delete actors
+    identityService.deleteGroup("thinkpol");
+    identityService.deleteGroup("innerparty");
+    identityService.deleteUser("bb");
+    identityService.deleteUser("obrien");
+    identityService.deleteUser("charr");
+    super.tearDown();
+  }
+
+  public void testCustomMailProducer() {
+    // deploy process
+    deployJpdlXmlString("<process name='custommail' xmlns='http://jbpm.org/jpdl/4.4'>"
+      + "  <start>"
+      + "    <transition to='send mail' />"
+      + "  </start>"
+      + "  <mail name='send mail' class='"
+      + AuditMailProducer.class.getName()
+      + "'>"
+      + "    <property name='template'>"
+      + "      <object method='getTemplate'>"
+      + "        <factory><ref type='"
+      + MailTemplateRegistry.class.getName()
+      + "'/></factory>"
+      + "        <arg><string value='rectify-template'/></arg>"
+      + "      </object>"
+      + "    </property>"
+      + "    <property name='auditGroup'><string value='thinkpol'/></property>"
+      + "    <transition to='end' />"
+      + "  </mail>"
+      + "  <end name='end'/>"
+      + "</process>");
+
+    // prepare dynamic values
+    String addressee = "winston at minitrue";
+    String newspaper = "times";
+    Calendar calendar = Calendar.getInstance();
+    calendar.clear();
+    calendar.set(1983, Calendar.DECEMBER, 3);
+    Date date = calendar.getTime();
+    String details = "reporting bb dayorder doubleplusungood refs unpersons rewrite "
+      + "fullwise upsub antefiling";
+    // assemble variables
+    Map<String, Object> variables = new HashMap<String, Object>();
+    variables.put("addressee", addressee);
+    variables.put("newspaper", newspaper);
+    variables.put("date", date);
+    variables.put("details", details);
+    // start process instance
+    ProcessInstance processInstance = executionService.startProcessInstanceByKey("custommail", variables);
+    assertProcessInstanceEnded(processInstance);
+
+    // examine produced messages
+    List<WiserMessage> messages = wiser.getMessages();
+    // winston, bb, innerparty(obrien), thinkpol(charr, obrien)
+    assertEquals(5, messages.size());
+  }
+
+  public static class AuditMailProducer extends MailProducerImpl {
+
+    private String auditGroup;
+    private static final long serialVersionUID = 1L;
+
+    public String getAuditGroup() {
+      return auditGroup;
+    }
+
+    public void setAuditGroup(String auditGroup) {
+      this.auditGroup = auditGroup;
+    }
+
+    @Override
+    protected void fillRecipients(Execution execution, Message email) throws MessagingException {
+      // add recipients from template
+      super.fillRecipients(execution, email);
+
+      // load audit group from database
+      EnvironmentImpl environment = EnvironmentImpl.getCurrent();
+      IdentitySession identitySession = environment.get(IdentitySession.class);
+      Group group = identitySession.findGroupById(auditGroup);
+
+      // send a blind carbon copy of every message to the audit group
+      AddressResolver addressResolver = environment.get(AddressResolver.class);
+      email.addRecipients(RecipientType.BCC, addressResolver.resolveAddresses(group));
+    }
+  }
+}

Copied: jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/type (from rev 6436, jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/customtype)

Modified: jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/type/CustomVariableTypeTest.java
===================================================================
--- jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/customtype/CustomVariableTypeTest.java	2010-06-24 19:31:56 UTC (rev 6436)
+++ jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/type/CustomVariableTypeTest.java	2010-06-26 01:59:29 UTC (rev 6437)
@@ -19,7 +19,7 @@
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */
-package org.jbpm.test.customtype;
+package org.jbpm.test.custom.type;
 
 import java.util.HashMap;
 import java.util.Map;

Modified: jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/type/Husky.java
===================================================================
--- jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/customtype/Husky.java	2010-06-24 19:31:56 UTC (rev 6436)
+++ jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/type/Husky.java	2010-06-26 01:59:29 UTC (rev 6437)
@@ -19,7 +19,7 @@
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */
-package org.jbpm.test.customtype;
+package org.jbpm.test.custom.type;
 
 
 /**

Modified: jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/type/HuskyMatcher.java
===================================================================
--- jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/customtype/HuskyMatcher.java	2010-06-24 19:31:56 UTC (rev 6436)
+++ jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/type/HuskyMatcher.java	2010-06-26 01:59:29 UTC (rev 6437)
@@ -19,7 +19,7 @@
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */
-package org.jbpm.test.customtype;
+package org.jbpm.test.custom.type;
 
 import org.jbpm.pvm.internal.type.Matcher;
 

Modified: jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/type/HuskyVariable.java
===================================================================
--- jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/customtype/HuskyVariable.java	2010-06-24 19:31:56 UTC (rev 6436)
+++ jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custom/type/HuskyVariable.java	2010-06-26 01:59:29 UTC (rev 6437)
@@ -19,7 +19,7 @@
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */
-package org.jbpm.test.customtype;
+package org.jbpm.test.custom.type;
 
 import org.jbpm.pvm.internal.type.Variable;
 

Copied: jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/cal/cfg (from rev 6436, jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custombusinesscalendarcfg)

Copied: jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/cal/impl (from rev 6436, jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custombusinesscalendarimpl)

Modified: jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/cal/impl/jbpm.cfg.xml
===================================================================
--- jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custombusinesscalendarimpl/jbpm.cfg.xml	2010-06-24 19:31:56 UTC (rev 6436)
+++ jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/cal/impl/jbpm.cfg.xml	2010-06-26 01:59:29 UTC (rev 6437)
@@ -8,7 +8,7 @@
   <import resource="jbpm.identity.cfg.xml" />
 
   <process-engine-context>
-    <object class="org.jbpm.test.custombusinesscalendarimpl.CustomBusinessCalendar" />
+    <object class="org.jbpm.test.custom.cal.impl.CustomBusinessCalendar" />
   </process-engine-context>
 
 </jbpm-configuration>

Added: jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/mail/jbpm.cfg.xml
===================================================================
--- jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/mail/jbpm.cfg.xml	                        (rev 0)
+++ jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/mail/jbpm.cfg.xml	2010-06-26 01:59:29 UTC (rev 6437)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jbpm-configuration>
+
+  <import resource="jbpm.default.cfg.xml" />
+  <import resource="jbpm.businesscalendar.cfg.xml" />
+  <import resource="jbpm.tx.hibernate.cfg.xml" />
+  <import resource="jbpm.jpdl.cfg.xml" />
+  <import resource="jbpm.bpmn.cfg.xml" />
+  <import resource="jbpm.identity.cfg.xml" />
+  <import resource="org/jbpm/test/custom/mail/jbpm.mail.templates.cfg.xml" />
+
+</jbpm-configuration>


Property changes on: jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/mail/jbpm.cfg.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + native

Copied: jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/mail/jbpm.mail.templates.cfg.xml (from rev 6436, jbpm4/trunk/modules/test-db/src/test/resources/jbpm.mail.templates.examples.xml)
===================================================================
--- jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/mail/jbpm.mail.templates.cfg.xml	                        (rev 0)
+++ jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/mail/jbpm.mail.templates.cfg.xml	2010-06-26 01:59:29 UTC (rev 6437)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jbpm-configuration>
+
+  <process-engine-context>
+
+    <mail-template name="rectify-template">
+      <to addresses="${addressee}" />
+      <cc users="bb" groups="innerparty" />
+      <subject>rectify ${newspaper}</subject>
+      <text>${newspaper} ${date} ${details}</text>
+    </mail-template>
+
+  </process-engine-context>
+
+</jbpm-configuration>

Copied: jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/type (from rev 6436, jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/customtype)

Modified: jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/type/husky.hbm.xml
===================================================================
--- jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/customtype/husky.hbm.xml	2010-06-24 19:31:56 UTC (rev 6436)
+++ jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/type/husky.hbm.xml	2010-06-26 01:59:29 UTC (rev 6437)
@@ -3,7 +3,7 @@
 
 <hibernate-mapping default-access="field">
 
-  <subclass name="org.jbpm.test.customtype.HuskyVariable" extends="org.jbpm.pvm.internal.type.Variable" discriminator-value="husky">
+  <subclass name="org.jbpm.test.custom.type.HuskyVariable" extends="org.jbpm.pvm.internal.type.Variable" discriminator-value="husky">
     <property name="name" column="STRING_VALUE_" type="string"/>
   </subclass>
 

Modified: jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/type/jbpm.cfg.xml
===================================================================
--- jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/customtype/jbpm.cfg.xml	2010-06-24 19:31:56 UTC (rev 6436)
+++ jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/type/jbpm.cfg.xml	2010-06-26 01:59:29 UTC (rev 6437)
@@ -9,10 +9,10 @@
 
   <process-engine-context>
 
-    <types resource="org/jbpm/test/customtype/jbpm.variable.types.xml" />
+    <types resource="org/jbpm/test/custom/type/jbpm.variable.types.xml" />
 
     <hibernate-configuration>
-      <cfg resource="org/jbpm/test/customtype/jbpm.hibernate.cfg.xml" />     
+      <cfg resource="org/jbpm/test/custom/type/jbpm.hibernate.cfg.xml" />     
     </hibernate-configuration>
     
     

Modified: jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/type/jbpm.hibernate.cfg.xml
===================================================================
--- jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/customtype/jbpm.hibernate.cfg.xml	2010-06-24 19:31:56 UTC (rev 6436)
+++ jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/type/jbpm.hibernate.cfg.xml	2010-06-26 01:59:29 UTC (rev 6437)
@@ -15,7 +15,7 @@
      <property name="hibernate.hbm2ddl.auto">create-drop</property>
      <property name="hibernate.format_sql">true</property>
 
-     <mapping resource="org/jbpm/test/customtype/husky.hbm.xml" />
+     <mapping resource="org/jbpm/test/custom/type/husky.hbm.xml" />
      
      <mapping resource="jbpm.repository.hbm.xml" />
      <mapping resource="jbpm.execution.hbm.xml" />

Modified: jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/type/jbpm.variable.types.xml
===================================================================
--- jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/customtype/jbpm.variable.types.xml	2010-06-24 19:31:56 UTC (rev 6436)
+++ jbpm4/trunk/modules/test-cfg/src/test/resources/org/jbpm/test/custom/type/jbpm.variable.types.xml	2010-06-26 01:59:29 UTC (rev 6437)
@@ -1,7 +1,7 @@
 <types>
 
-  <type name="husky" variable-class="org.jbpm.test.customtype.HuskyVariable">
-    <matcher><object class="org.jbpm.test.customtype.HuskyMatcher" /></matcher>
+  <type name="husky" variable-class="org.jbpm.test.custom.type.HuskyVariable">
+    <matcher><object class="org.jbpm.test.custom.type.HuskyMatcher" /></matcher>
   </type>
 
   <!-- types stored in a native column -->

Modified: jbpm4/trunk/modules/test-db/pom.xml
===================================================================
--- jbpm4/trunk/modules/test-db/pom.xml	2010-06-24 19:31:56 UTC (rev 6436)
+++ jbpm4/trunk/modules/test-db/pom.xml	2010-06-26 01:59:29 UTC (rev 6437)
@@ -62,10 +62,6 @@
       <scope>runtime</scope>
     </dependency>
     <dependency>
-      <groupId>org.subethamail</groupId>
-      <artifactId>subethasmtp-wiser</artifactId>
-    </dependency>
-    <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring</artifactId>
       <scope>test</scope>
@@ -141,7 +137,7 @@
                       <fileset dir="${user.home}/.jbpm4/jdbc" />
                     </copy>
                     <ant antfile="../distro/src/main/files/install/build.xml" target="create.cfg">
-                      <property name="tx" value="standalone.testsuite.examples" />
+                      <property name="tx" value="standalone.testsuite" />
                       <property name="mail.cfg" value="testsuite" />
                       <property name="database" value="${database}" />
                       <property name="cfg.dest.dir" value="target/test-classes" />

Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activity/mail/AttachmentTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activity/mail/AttachmentTest.java	2010-06-24 19:31:56 UTC (rev 6436)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activity/mail/AttachmentTest.java	2010-06-26 01:59:29 UTC (rev 6437)
@@ -39,6 +39,8 @@
 import org.jbpm.api.ProcessInstance;
 import org.jbpm.pvm.internal.util.IoUtil;
 import org.jbpm.test.JbpmTestCase;
+import org.jbpm.test.mail.MailTestSetup;
+
 import org.subethamail.wiser.Wiser;
 import org.subethamail.wiser.WiserMessage;
 

Deleted: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activity/mail/CustomMailProducerTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activity/mail/CustomMailProducerTest.java	2010-06-24 19:31:56 UTC (rev 6436)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activity/mail/CustomMailProducerTest.java	2010-06-26 01:59:29 UTC (rev 6437)
@@ -1,157 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * 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.jbpm.test.activity.mail;
-
-import java.util.Calendar;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.mail.Message;
-import javax.mail.MessagingException;
-import javax.mail.Message.RecipientType;
-
-import org.jbpm.api.Execution;
-import org.jbpm.api.ProcessInstance;
-import org.jbpm.api.identity.Group;
-import org.jbpm.pvm.internal.email.impl.MailProducerImpl;
-import org.jbpm.pvm.internal.email.impl.MailTemplateRegistry;
-import org.jbpm.pvm.internal.email.spi.AddressResolver;
-import org.jbpm.pvm.internal.env.EnvironmentImpl;
-import org.jbpm.pvm.internal.identity.spi.IdentitySession;
-import org.jbpm.test.JbpmTestCase;
-import org.subethamail.wiser.Wiser;
-import org.subethamail.wiser.WiserMessage;
-
-/**
- * @author Alejandro Guizar
- */
-public class CustomMailProducerTest extends JbpmTestCase {
-
-  private Wiser wiser = new Wiser();
-
-  protected void setUp() throws Exception {
-    super.setUp();
-    // create actors
-    identityService.createUser("bb", "Big Brother", null, "bb at oceania");
-    identityService.createUser("obrien", null, "O'Brien", "obrien at miniluv");
-    identityService.createUser("charr", null, "Charrington", "charr at miniluv");
-    identityService.createGroup("thinkpol");
-    identityService.createGroup("innerparty");
-    identityService.createMembership("obrien", "innerparty");
-    identityService.createMembership("charr", "thinkpol");
-    identityService.createMembership("obrien", "thinkpol");
-    // start mail server
-    wiser.setPort(2525);
-    wiser.start();
-  }
-
-  protected void tearDown() throws Exception {
-    // stop mail server
-    wiser.stop();
-    // delete actors
-    identityService.deleteGroup("thinkpol");
-    identityService.deleteGroup("innerparty");
-    identityService.deleteUser("bb");
-    identityService.deleteUser("obrien");
-    identityService.deleteUser("charr");
-    super.tearDown();
-  }
-
-  public void testCustomMailProducer() {
-    // deploy process
-    deployJpdlXmlString("<process name='custommail' xmlns='http://jbpm.org/jpdl/4.4'>"
-      + "  <start>"
-      + "    <transition to='send mail' />"
-      + "  </start>"
-      + "  <mail name='send mail' class='"
-      + AuditMailProducer.class.getName()
-      + "'>"
-      + "    <property name='template'>"
-      + "      <object method='getTemplate'>"
-      + "        <factory><ref type='"
-      + MailTemplateRegistry.class.getName()
-      + "'/></factory>"
-      + "        <arg><string value='rectify-template'/></arg>"
-      + "      </object>"
-      + "    </property>"
-      + "    <property name='auditGroup'><string value='thinkpol'/></property>"
-      + "    <transition to='end' />"
-      + "  </mail>"
-      + "  <end name='end'/>"
-      + "</process>");
-
-    // prepare dynamic values
-    String addressee = "winston at minitrue";
-    String newspaper = "times";
-    Calendar calendar = Calendar.getInstance();
-    calendar.clear();
-    calendar.set(1983, Calendar.DECEMBER, 3);
-    Date date = calendar.getTime();
-    String details = "reporting bb dayorder doubleplusungood refs unpersons rewrite "
-      + "fullwise upsub antefiling";
-    // assemble variables
-    Map<String, Object> variables = new HashMap<String, Object>();
-    variables.put("addressee", addressee);
-    variables.put("newspaper", newspaper);
-    variables.put("date", date);
-    variables.put("details", details);
-    // start process instance
-    ProcessInstance processInstance = executionService.startProcessInstanceByKey("custommail", variables);
-    assertProcessInstanceEnded(processInstance);
-
-    // examine produced messages
-    List<WiserMessage> messages = wiser.getMessages();
-    // winston, bb, innerparty(obrien), thinkpol(charr, obrien)
-    assertEquals(5, messages.size());
-  }
-
-  public static class AuditMailProducer extends MailProducerImpl {
-
-    private String auditGroup;
-    private static final long serialVersionUID = 1L;
-
-    public String getAuditGroup() {
-      return auditGroup;
-    }
-
-    public void setAuditGroup(String auditGroup) {
-      this.auditGroup = auditGroup;
-    }
-
-    @Override
-    protected void fillRecipients(Execution execution, Message email) throws MessagingException {
-      // add recipients from template
-      super.fillRecipients(execution, email);
-
-      // load audit group from database
-      EnvironmentImpl environment = EnvironmentImpl.getCurrent();
-      IdentitySession identitySession = environment.get(IdentitySession.class);
-      Group group = identitySession.findGroupById(auditGroup);
-
-      // send a blind carbon copy of every message to the audit group
-      AddressResolver addressResolver = environment.get(AddressResolver.class);
-      email.addRecipients(RecipientType.BCC, addressResolver.resolveAddresses(group));
-    }
-  }
-}

Deleted: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activity/mail/MailTestSetup.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activity/mail/MailTestSetup.java	2010-06-24 19:31:56 UTC (rev 6436)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activity/mail/MailTestSetup.java	2010-06-26 01:59:29 UTC (rev 6437)
@@ -1,56 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * 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.jbpm.test.activity.mail;
-
-import org.subethamail.wiser.Wiser;
-
-import junit.extensions.TestSetup;
-import junit.framework.TestSuite;
-
-/**
- * @author Alejandro Guizar
- */
-public class MailTestSetup extends TestSetup {
-
-  private final Wiser wiser;
-
-  public MailTestSetup(Class<?> testClass, Wiser wiser) {
-    super(new TestSuite(testClass));
-    this.wiser = wiser;
-  }
-
-  public Wiser getWiser() {
-    return wiser;
-  }
-
-  @Override
-  protected void setUp() throws Exception {
-    wiser.setPort(2525);
-    wiser.start();
-  }
-
-  @Override
-  protected void tearDown() throws Exception {
-    wiser.stop();
-  }
-
-}

Modified: jbpm4/trunk/modules/test-db/src/test/resources/jbpm.cfg.xml
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/resources/jbpm.cfg.xml	2010-06-24 19:31:56 UTC (rev 6436)
+++ jbpm4/trunk/modules/test-db/src/test/resources/jbpm.cfg.xml	2010-06-26 01:59:29 UTC (rev 6437)
@@ -8,6 +8,5 @@
   <import resource="jbpm.jpdl.cfg.xml" />
   <import resource="jbpm.bpmn.cfg.xml" />
   <import resource="jbpm.identity.cfg.xml" />
-  <import resource="jbpm.mail.templates.examples.xml" />
 
 </jbpm-configuration>

Deleted: jbpm4/trunk/modules/test-db/src/test/resources/jbpm.mail.templates.examples.xml
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/resources/jbpm.mail.templates.examples.xml	2010-06-24 19:31:56 UTC (rev 6436)
+++ jbpm4/trunk/modules/test-db/src/test/resources/jbpm.mail.templates.examples.xml	2010-06-26 01:59:29 UTC (rev 6437)
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<jbpm-configuration>
-
-  <process-engine-context>
-
-    <mail-template name="rectify-template">
-      <to addresses="${addressee}" />
-      <cc users="bb" groups="innerparty" />
-      <subject>rectify ${newspaper}</subject>
-      <text>${newspaper} ${date} ${details}</text>
-    </mail-template>
-
-  </process-engine-context>
-
-</jbpm-configuration>

Modified: jbpm4/trunk/modules/test-pojo/.classpath
===================================================================
--- jbpm4/trunk/modules/test-pojo/.classpath	2010-06-24 19:31:56 UTC (rev 6436)
+++ jbpm4/trunk/modules/test-pojo/.classpath	2010-06-26 01:59:29 UTC (rev 6437)
@@ -2,6 +2,8 @@
 <classpath>
 	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
 	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
+	<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+	<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
 	<classpathentry kind="output" path="target/classes"/>

Modified: jbpm4/trunk/modules/test-pojo/pom.xml
===================================================================
--- jbpm4/trunk/modules/test-pojo/pom.xml	2010-06-24 19:31:56 UTC (rev 6436)
+++ jbpm4/trunk/modules/test-pojo/pom.xml	2010-06-26 01:59:29 UTC (rev 6437)
@@ -54,20 +54,6 @@
     </dependency>
   </dependencies>
   
-  <!-- Plugins -->
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <testSourceDirectory>src/main/java</testSourceDirectory>
-          <classesDirectory>target/classes</classesDirectory>
-          <testClassesDirectory>target/classes</testClassesDirectory>        
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-  
   <profiles>
     <!-- skip tests if this is an integration test run 
     (only examples and test-db are part of the integration test runs) -->

Copied: jbpm4/trunk/modules/test-pojo/src/test (from rev 6436, jbpm4/trunk/modules/test-pojo/src/main)



More information about the jbpm-commits mailing list