[jbpm-commits] JBoss JBPM SVN: r6796 - projects/migration_tool/trunk/src/test/java/org/jbpm/migration.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Nov 3 18:41:53 EDT 2010


Author: MohReece
Date: 2010-11-03 18:41:52 -0400 (Wed, 03 Nov 2010)
New Revision: 6796

Added:
   projects/migration_tool/trunk/src/test/java/org/jbpm/migration/BpmnValidatorTest.java
Log:
Added test for BPMN validator.

Added: projects/migration_tool/trunk/src/test/java/org/jbpm/migration/BpmnValidatorTest.java
===================================================================
--- projects/migration_tool/trunk/src/test/java/org/jbpm/migration/BpmnValidatorTest.java	                        (rev 0)
+++ projects/migration_tool/trunk/src/test/java/org/jbpm/migration/BpmnValidatorTest.java	2010-11-03 22:41:52 UTC (rev 6796)
@@ -0,0 +1,58 @@
+/*
+ * 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.migration;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.junit.Assert.assertThat;
+
+import java.io.File;
+
+import org.apache.log4j.BasicConfigurator;
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+import org.jbpm.migration.util.XmlUtils;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.w3c.dom.Document;
+
+/**
+ * Tests for the BPMN process definition validator.
+ * 
+ * @author Eric D. Schabell
+ * @author Maurice de Chateau
+ */
+public class BpmnValidatorTest {
+    @BeforeClass
+    public static void oneTimeSetUp() {
+        BasicConfigurator.configure();
+        Logger.getRootLogger().setLevel(Level.DEBUG);
+    }
+
+    @Test
+    public void validDefinition() throws Exception {
+        File bpmn = new File("src/test/resources/bpmn/Test.bpmn.xml");
+        Document bpmnDoc = XmlUtils.parseFile(bpmn);
+        assertThat(bpmnDoc, is(notNullValue()));
+        assertThat(BpmnValidator.validateDefinition(bpmnDoc), is(true));
+    }
+}


Property changes on: projects/migration_tool/trunk/src/test/java/org/jbpm/migration/BpmnValidatorTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain



More information about the jbpm-commits mailing list