Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
removed deprecated import & rename class
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubschwan committed Aug 12, 2015
1 parent 08be21b commit e504769
Show file tree
Hide file tree
Showing 17 changed files with 45 additions and 44 deletions.
Expand Up @@ -12,6 +12,7 @@
import org.jbpm.migration.tools.MigrationHelper;

import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.test.JbpmJUnitBaseTestCase;
import org.junit.After;
import org.kie.api.io.ResourceType;
import org.kie.api.KieBase;
Expand All @@ -27,7 +28,7 @@
*
* Contains methods for test preparation.
*/
public class MigrationTestWrapper {
public class JbpmMigrationRuntimeTest extends JbpmJUnitBaseTestCase {

protected static KieBase kbase;

Expand All @@ -37,11 +38,11 @@ public class MigrationTestWrapper {

protected static ProcessDefinition processDef;

private static MigrationTestWrapper instance = new MigrationTestWrapper();
private static JbpmMigrationRuntimeTest instance = new JbpmMigrationRuntimeTest();

private static File basedir;
private static Properties properties;
private static final Logger logger = LoggerFactory.getLogger(MigrationTestWrapper.class);
private static final Logger logger = LoggerFactory.getLogger(JbpmMigrationRuntimeTest.class);

protected static List<File> migrate(String... processDefinitions) {
final List<File> migratedFiles = new ArrayList<File>(processDefinitions.length);
Expand All @@ -54,7 +55,7 @@ protected static List<File> migrate(String... processDefinitions) {
protected static File migrate(String processDefinition) {
File jpdlFile = null;
try {
jpdlFile = new File(MigrationTestWrapper.class.getResource("/" + processDefinition).toURI());
jpdlFile = new File(JbpmMigrationRuntimeTest.class.getResource("/" + processDefinition).toURI());
} catch (URISyntaxException ex) {
logger.error(null, ex);
}
Expand Down Expand Up @@ -122,7 +123,7 @@ protected static void prepareProcess(String processDefinition) {
*/
protected static void addBpmnProcessFromClassPath(String... paths) {
for (String path : paths) {
kbuilder.add(ResourceFactory.newClassPathResource(path, MigrationTestWrapper.class), ResourceType.BPMN2);
kbuilder.add(ResourceFactory.newClassPathResource(path, JbpmMigrationRuntimeTest.class), ResourceType.BPMN2);
}

if (kbuilder.hasErrors()) {
Expand All @@ -147,12 +148,12 @@ protected final File createTempFile(String name) {
}

protected static synchronized File getBasedir() {
if (MigrationTestWrapper.basedir == null) {
if (JbpmMigrationRuntimeTest.basedir == null) {
Assertions.assertThat(System.getProperty("basedir")).as("System property for basedir not set!").isNotNull();
MigrationTestWrapper.basedir = new File(System.getProperty("basedir"));
Assertions.assertThat(MigrationTestWrapper.basedir.exists()).as("Basedir does not exist! Check value of 'basedir' system property.").isTrue();
JbpmMigrationRuntimeTest.basedir = new File(System.getProperty("basedir"));
Assertions.assertThat(JbpmMigrationRuntimeTest.basedir.exists()).as("Basedir does not exist! Check value of 'basedir' system property.").isTrue();
}
return MigrationTestWrapper.basedir;
return JbpmMigrationRuntimeTest.basedir;
}

/**
Expand All @@ -175,7 +176,7 @@ protected static String getProperty(String key, String defaultValue) {
protected static synchronized Properties getProperties() {
if (properties == null) {
// lazy initialization of properties
File basedir = MigrationTestWrapper.getBasedir();
File basedir = JbpmMigrationRuntimeTest.getBasedir();
File propFile = new File(basedir, "build.properties");
if (!propFile.exists()) {
propFile = new File(basedir.getParentFile(), "build.properties");
Expand Down
@@ -1,15 +1,15 @@
package org.jbpm.migration.scenarios;

import org.assertj.core.api.Assertions;
import org.jbpm.migration.MigrationTestWrapper;
import org.jbpm.migration.JbpmMigrationRuntimeTest;
import org.junit.Test;

/**
* Insurance - InitializeAndValidateProcess scenario.
*
*/
@org.junit.Ignore("look at JIRA https://issues.jboss.org/browse/JBPM-4313")
public class InitializeAndValidateTest extends MigrationTestWrapper {
public class InitializeAndValidateTest extends JbpmMigrationRuntimeTest {
public static final String definition =
"org/jbpm/migration/scenarios/insuranceInitializeAndValidateProcess/processdefinition.xml";

Expand Down
Expand Up @@ -4,7 +4,7 @@
import static org.jbpm.migration.tools.listeners.TrackingListenerAssert.assertProcessStarted;
import static org.jbpm.migration.tools.listeners.TrackingListenerAssert.assertTriggeredAndLeft;

import org.jbpm.migration.MigrationTestWrapper;
import org.jbpm.migration.JbpmMigrationRuntimeTest;
import org.jbpm.migration.tools.bpmn2.JavaNodeHandler;
import org.jbpm.migration.tools.jpdl.JpdlAssert;
import org.jbpm.migration.tools.jpdl.handlers.DefaultActionHandler;
Expand All @@ -17,7 +17,7 @@
/**
* Single scenario with fork and corresponding join.
*/
public class SingleForkJoinTest extends MigrationTestWrapper {
public class SingleForkJoinTest extends JbpmMigrationRuntimeTest {
public static final String definition =
"org/jbpm/migration/scenarios/singleForkJoin/processdefinition.xml";

Expand Down
Expand Up @@ -3,7 +3,7 @@
import static org.jbpm.migration.tools.listeners.TrackingListenerAssert.assertProcessCompleted;
import static org.jbpm.migration.tools.listeners.TrackingListenerAssert.assertProcessStarted;

import org.jbpm.migration.MigrationTestWrapper;
import org.jbpm.migration.JbpmMigrationRuntimeTest;
import org.jbpm.migration.tools.jpdl.JpdlAssert;
import org.jbpm.migration.tools.jpdl.handlers.DefaultActionHandler;
import org.jbpm.migration.tools.jpdl.listeners.TrackingActionListener;
Expand All @@ -15,7 +15,7 @@
/**
* Scenario with a single node.
*/
public class SingleNodeTest extends MigrationTestWrapper {
public class SingleNodeTest extends JbpmMigrationRuntimeTest {
public static final String definition =
"org/jbpm/migration/scenarios/singleNode/processdefinition.xml";

Expand Down
Expand Up @@ -4,7 +4,7 @@
import static org.jbpm.migration.tools.listeners.TrackingListenerAssert.assertProcessStarted;
import static org.jbpm.migration.tools.listeners.TrackingListenerAssert.assertTriggeredAndLeft;

import org.jbpm.migration.MigrationTestWrapper;
import org.jbpm.migration.JbpmMigrationRuntimeTest;
import org.jbpm.migration.tools.jpdl.JpdlAssert;
import org.jbpm.migration.tools.jpdl.handlers.DefaultActionHandler;
import org.jbpm.migration.tools.jpdl.listeners.TrackingActionListener;
Expand All @@ -15,7 +15,7 @@
/**
* Single node with an action inside.
*/
public class SingleNodeWithActionTest extends MigrationTestWrapper {
public class SingleNodeWithActionTest extends JbpmMigrationRuntimeTest {
public static final String definition =
"org/jbpm/migration/scenarios/singleNodeWithAction/processdefinition.xml";

Expand Down
Expand Up @@ -4,7 +4,7 @@
import static org.jbpm.migration.tools.listeners.TrackingListenerAssert.assertProcessStarted;
import static org.jbpm.migration.tools.listeners.TrackingListenerAssert.assertTriggeredAndLeft;

import org.jbpm.migration.MigrationTestWrapper;
import org.jbpm.migration.JbpmMigrationRuntimeTest;
import org.jbpm.migration.tools.bpmn2.ExecutionAssert;
import org.jbpm.migration.tools.bpmn2.JavaNodeHandler;
import org.jbpm.migration.tools.jpdl.JpdlAssert;
Expand All @@ -19,7 +19,7 @@
* Single node scenario with two events inside - each the same action.
*
*/
public class SingleNodeWithEventTest extends MigrationTestWrapper {
public class SingleNodeWithEventTest extends JbpmMigrationRuntimeTest {
public static final String definition =
"org/jbpm/migration/scenarios/singleNodeWithEvent/processdefinition.xml";

Expand Down
Expand Up @@ -4,7 +4,7 @@
import static org.jbpm.migration.tools.listeners.TrackingListenerAssert.assertProcessStarted;
import static org.jbpm.migration.tools.listeners.TrackingListenerAssert.assertTriggeredAndLeft;

import org.jbpm.migration.MigrationTestWrapper;
import org.jbpm.migration.JbpmMigrationRuntimeTest;
import org.jbpm.migration.tools.jpdl.JpdlAssert;
import org.jbpm.migration.tools.jpdl.handlers.DefaultActionHandler;
import org.jbpm.migration.tools.jpdl.listeners.TrackingActionListener;
Expand All @@ -20,7 +20,7 @@
* The script contents cannot be transformed automatically, but it should be
* added as a comment into corresponding scriptTask in the result BPMN.
*/
public class SingleNodeWithScriptTest extends MigrationTestWrapper {
public class SingleNodeWithScriptTest extends JbpmMigrationRuntimeTest {
public static final String definition =
"org/jbpm/migration/scenarios/singleNodeWithScript/processdefinition.xml";

Expand Down
Expand Up @@ -4,7 +4,7 @@
import static org.jbpm.migration.tools.listeners.TrackingListenerAssert.assertProcessStarted;
import static org.jbpm.migration.tools.listeners.TrackingListenerAssert.assertTriggeredAndLeft;

import org.jbpm.migration.MigrationTestWrapper;
import org.jbpm.migration.JbpmMigrationRuntimeTest;
import org.jbpm.migration.tools.jpdl.JpdlAssert;
import org.jbpm.migration.tools.listeners.TrackingProcessEventListener;
import org.jbpm.graph.exe.ProcessInstance;
Expand All @@ -17,7 +17,7 @@
*
*
*/
public class SingleStateTest extends MigrationTestWrapper {
public class SingleStateTest extends JbpmMigrationRuntimeTest {
public static final String definition =
"org/jbpm/migration/scenarios/singleState/processdefinition.xml";

Expand Down
Expand Up @@ -7,7 +7,7 @@
import java.util.Set;

import org.assertj.core.api.Assertions;
import org.jbpm.migration.MigrationTestWrapper;
import org.jbpm.migration.JbpmMigrationRuntimeTest;
import org.jbpm.migration.tools.bpmn2.ExecutionInfo;
import org.jbpm.migration.tools.bpmn2.JavaNodeHandler;
import org.jbpm.migration.tools.jpdl.JpdlAssert;
Expand All @@ -25,7 +25,7 @@
* https://issues.jboss.org/browse/JBPM-3681
*
*/
public class SingleStateWithEventTest extends MigrationTestWrapper {
public class SingleStateWithEventTest extends JbpmMigrationRuntimeTest {
public static final String DEFINITION =
"org/jbpm/migration/scenarios/singleStateWithEvent/processdefinition.xml";
public static final String PROCESS_ID = "singleState_Process";
Expand Down
Expand Up @@ -6,7 +6,7 @@
import java.util.HashMap;
import java.util.Map;

import org.jbpm.migration.MigrationTestWrapper;
import org.jbpm.migration.JbpmMigrationRuntimeTest;
import org.jbpm.migration.tools.jpdl.JpdlAssert;
import org.jbpm.migration.tools.jpdl.handlers.VariableActionHandler;
import org.jbpm.migration.tools.jpdl.listeners.TrackingVariableChangeListener;
Expand All @@ -18,7 +18,7 @@
/**
* Testing process with single subprocess node.
*/
public class SingleSubFlowTest extends MigrationTestWrapper {
public class SingleSubFlowTest extends JbpmMigrationRuntimeTest {
public static final String topProcessDefinition =
"org/jbpm/migration/scenarios/singleSubFlow/processdefinition.xml";
public static final String subProcessDefinition =
Expand Down
Expand Up @@ -6,7 +6,7 @@
import java.util.Map;

import org.assertj.core.api.Assertions;
import org.jbpm.migration.MigrationTestWrapper;
import org.jbpm.migration.JbpmMigrationRuntimeTest;
import org.jbpm.migration.tools.jpdl.JpdlAssert;
import org.jbpm.migration.tools.jpdl.handlers.VariableActionHandler;
import org.jbpm.migration.tools.jpdl.listeners.TrackingVariableChangeListener;
Expand All @@ -20,7 +20,7 @@
* Testing process with single subprocess node.
*/
@org.junit.Ignore("take a loot at https://issues.jboss.org/browse/JBPM-3684 , comment #3")
public class SingleSubFlowVariableChangeTest extends MigrationTestWrapper {
public class SingleSubFlowVariableChangeTest extends JbpmMigrationRuntimeTest {
public static final String topProcessDefinition =
"org/jbpm/migration/scenarios/singleSubFlowVariableChange/processdefinition.xml";
public static final String subProcessDefinition =
Expand Down
@@ -1,6 +1,6 @@
package org.jbpm.migration.scenarios;

import org.jbpm.migration.MigrationTestWrapper;
import org.jbpm.migration.JbpmMigrationRuntimeTest;
import org.jbpm.migration.tools.jpdl.JpdlAssert;
import org.jbpm.migration.tools.jpdl.handlers.DefaultActionHandler;
import org.jbpm.migration.tools.jpdl.listeners.TrackingActionListener;
Expand All @@ -16,7 +16,7 @@
* Verifies https://issues.jboss.org/browse/JBPM-3693
*
*/
public class SingleSuperStateTest extends MigrationTestWrapper {
public class SingleSuperStateTest extends JbpmMigrationRuntimeTest {
public static final String definition =
"org/jbpm/migration/scenarios/singleSuperState/processdefinition.xml";

Expand Down
Expand Up @@ -6,7 +6,7 @@
import static org.jbpm.migration.tools.listeners.TrackingListenerAssert.assertTriggered;

import org.assertj.core.api.Assertions;
import org.jbpm.migration.MigrationTestWrapper;
import org.jbpm.migration.JbpmMigrationRuntimeTest;
import org.jbpm.migration.tools.jpdl.JpdlAssert;
import org.jbpm.migration.tools.jpdl.JpdlHelper;
import org.jbpm.migration.tools.listeners.TrackingProcessEventListener;
Expand All @@ -23,7 +23,7 @@
* task node with task inside => task. Should be userTask.
*
*/
public class SingleTaskTest extends MigrationTestWrapper {
public class SingleTaskTest extends JbpmMigrationRuntimeTest {

public static final String definition =
"org/jbpm/migration/scenarios/singleTask/processdefinition.xml";
Expand Down
Expand Up @@ -7,7 +7,7 @@
import java.util.Set;

import org.assertj.core.api.Assertions;
import org.jbpm.migration.MigrationTestWrapper;
import org.jbpm.migration.JbpmMigrationRuntimeTest;
import org.jbpm.migration.tools.bpmn2.ExecutionInfo;
import org.jbpm.migration.tools.bpmn2.JavaNodeHandler;
import org.jbpm.migration.tools.jpdl.JpdlAssert;
Expand All @@ -17,7 +17,7 @@
import org.jbpm.migration.tools.listeners.TrackingProcessEventListener;
import org.jbpm.graph.exe.ProcessInstance;
import org.jbpm.taskmgmt.exe.TaskInstance;
import org.jbpm.test.JbpmJUnitTestCase;
import org.jbpm.test.JbpmJUnitBaseTestCase;
import org.junit.BeforeClass;
import org.junit.Test;
import org.kie.api.runtime.process.WorkItem;
Expand All @@ -26,7 +26,7 @@
* Testing single task with event on node enter and leave. translated BPMN2
* contains Java task->userTask->Java task.
*/
public class SingleTaskWithEventTest extends MigrationTestWrapper {
public class SingleTaskWithEventTest extends JbpmMigrationRuntimeTest {
public static final String definition =
"org/jbpm/migration/scenarios/singleTaskWithEvent/processdefinition.xml";
public static final String processId = "singleTask_Process";
Expand Down Expand Up @@ -73,7 +73,7 @@ public void testBpmn() {
TrackingProcessEventListener listener = new TrackingProcessEventListener();
ksession.addEventListener(listener);

final JbpmJUnitTestCase.TestWorkItemHandler humanTaskHandler = new JbpmJUnitTestCase.TestWorkItemHandler();
final JbpmJUnitBaseTestCase.TestWorkItemHandler humanTaskHandler = new JbpmJUnitBaseTestCase.TestWorkItemHandler();
ksession.getWorkItemManager().registerWorkItemHandler("Human Task", humanTaskHandler);

final JavaNodeHandler javaNodeHandler = new JavaNodeHandler();
Expand Down
Expand Up @@ -4,7 +4,7 @@
import static org.jbpm.migration.tools.listeners.TrackingListenerAssert.assertProcessStarted;
import static org.jbpm.migration.tools.listeners.TrackingListenerAssert.assertTriggeredAndLeft;

import org.jbpm.migration.MigrationTestWrapper;
import org.jbpm.migration.JbpmMigrationRuntimeTest;
import org.jbpm.migration.tools.bpmn2.JavaNodeHandler;
import org.jbpm.migration.tools.jpdl.JpdlAssert;
import org.jbpm.migration.tools.jpdl.handlers.DefaultActionHandler;
Expand All @@ -19,7 +19,7 @@
* transition should be migrated into a sequenceFlow -> scriptTask ->
* sequenceFlow, and the action executed.
*/
public class SingleTransitionWithActionTest extends MigrationTestWrapper {
public class SingleTransitionWithActionTest extends JbpmMigrationRuntimeTest {
public static final String definition =
"org/jbpm/migration/scenarios/singleTransitionWithAction/processdefinition.xml";

Expand Down
Expand Up @@ -4,7 +4,7 @@
import static org.jbpm.migration.tools.listeners.TrackingListenerAssert.assertProcessStarted;
import static org.jbpm.migration.tools.listeners.TrackingListenerAssert.assertTriggeredAndLeft;

import org.jbpm.migration.MigrationTestWrapper;
import org.jbpm.migration.JbpmMigrationRuntimeTest;
import org.jbpm.migration.tools.jpdl.JpdlAssert;
import org.jbpm.migration.tools.jpdl.handlers.DefaultActionHandler;
import org.jbpm.migration.tools.jpdl.listeners.TrackingActionListener;
Expand All @@ -20,7 +20,7 @@
* The script contents cannot be transformed automatically, but it should be
* added as a comment into corresponding scriptTask in the result BPMN.
*/
public class SingleTransitionWithScriptTest extends MigrationTestWrapper {
public class SingleTransitionWithScriptTest extends JbpmMigrationRuntimeTest {
public static final String definition =
"org/jbpm/migration/scenarios/singleTransitionWithScript/processdefinition.xml";

Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/jbpm/migration/scenarios/SwimlanesTest.java
Expand Up @@ -6,7 +6,7 @@
import java.util.HashMap;

import org.assertj.core.api.Assertions;
import org.jbpm.migration.MigrationTestWrapper;
import org.jbpm.migration.JbpmMigrationRuntimeTest;
import org.jbpm.migration.tools.jpdl.JpdlAssert;
import org.jbpm.migration.tools.jpdl.JpdlHelper;
import org.jbpm.migration.tools.jpdl.handlers.DefaultActionHandler;
Expand All @@ -23,7 +23,7 @@
* Testing migration of swimlanes.
*
*/
public class SwimlanesTest extends MigrationTestWrapper {
public class SwimlanesTest extends JbpmMigrationRuntimeTest {

public static final String definition
= "org/jbpm/migration/scenarios/swimlanesTest/processdefinition.xml";
Expand Down

0 comments on commit e504769

Please sign in to comment.