[jbpm-commits] JBoss JBPM SVN: r3016 - in jbpm4/trunk/modules: test-db/src/test/java/org/jbpm/test/basicfeatures and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Nov 20 10:46:29 EST 2008


Author: tom.baeyens at jboss.com
Date: 2008-11-20 10:46:29 -0500 (Thu, 20 Nov 2008)
New Revision: 3016

Added:
   jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/basicfeatures/ConfigurationTest.java
Modified:
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/Configuration.java
Log:
configuration testing

Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/Configuration.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/Configuration.java	2008-11-20 15:46:13 UTC (rev 3015)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/Configuration.java	2008-11-20 15:46:29 UTC (rev 3016)
@@ -52,7 +52,7 @@
     impl = instantiate(implementationClassName);
   }
   
-  public Configuration(Configuration base){
+  protected Configuration(Configuration base){
   }
   
   private synchronized String getImplementationClassName(String type) {

Added: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/basicfeatures/ConfigurationTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/basicfeatures/ConfigurationTest.java	                        (rev 0)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/basicfeatures/ConfigurationTest.java	2008-11-20 15:46:29 UTC (rev 3016)
@@ -0,0 +1,57 @@
+/*
+ * 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.basicfeatures;
+
+import org.jbpm.Configuration;
+import org.jbpm.ProcessEngine;
+import org.jbpm.test.JbpmTestCase;
+
+/**
+ * @author Tom Baeyens
+ */
+public class ConfigurationTest extends JbpmTestCase {
+
+  public void testMinimalConfiguration() {
+    ProcessEngine processEngine = new Configuration()
+        .setXmlString("<configuration />")
+        .buildProcessEngine();
+    assertNotNull(processEngine);
+  }
+
+  public void testConfigurationServices() {
+    ProcessEngine processEngine = new Configuration()
+        .setXmlString(
+            "<configuration>" +
+            "  <environment-factory>" +
+            "    <process-service />" +
+            "    <execution-service />" +
+            "    <management-service />" +
+            "  </environment-factory>" +
+            "</configuration>"
+        )
+        .buildProcessEngine();
+    assertNotNull(processEngine);
+    assertNotNull(processEngine.getProcessService());
+    assertNotNull(processEngine.getExecutionService());
+    assertNotNull(processEngine.getManagementService());
+  }
+}


Property changes on: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/basicfeatures/ConfigurationTest.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF




More information about the jbpm-commits mailing list