private static final String TEST_PROCESS_USER_TASK_V2 = "org/activiti/engine/test/db/ProcessInstanceMigrationTest.testSetProcessDefinitionVersionWithTaskV2.bpmn20.xml";
private static final String TEST_PROCESS_NESTED_SUB_EXECUTIONS = "org/activiti/engine/test/db/ProcessInstanceMigrationTest.testSetProcessDefinitionVersionSubExecutionsNested.bpmn20.xml";
public void testSetProcessDefinitionVersionEmptyArguments() {
try {
new SetProcessDefinitionVersionCmd(null, 23);
fail("ActivitiException expected");
} catch (ActivitiIllegalArgumentException ae) {
assertTextPresent("The process instance id is mandatory, but 'null' has been provided.", ae.getMessage());
}
try {
new SetProcessDefinitionVersionCmd("", 23);
fail("ActivitiException expected");
} catch (ActivitiIllegalArgumentException ae) {
assertTextPresent("The process instance id is mandatory, but '' has been provided.", ae.getMessage());
}
try {
new SetProcessDefinitionVersionCmd("42", null);
fail("ActivitiException expected");
} catch (ActivitiIllegalArgumentException ae) {
assertTextPresent("The process definition version is mandatory, but 'null' has been provided.", ae.getMessage());
}
try {
new SetProcessDefinitionVersionCmd("42", -1);
fail("ActivitiException expected");
} catch (ActivitiIllegalArgumentException ae) {
assertTextPresent("The process definition version must be positive, but '-1' has been provided.", ae.getMessage());
}
}