private static EPUndeployPreconditionException makeException(PathRegistryObjectType objectType, String name, String otherDeploymentId) { String objectName = objectType.getName(); String firstUppercase = objectName.substring(0, 1).toUpperCase(Locale.ENGLISH) + objectName.substring(1); return new EPUndeployPreconditionException(firstUppercase + " '" + name + "' cannot be un-deployed as it is referenced by deployment '" + otherDeploymentId + "'"); }
private static void tryInvalidUndeploy(RegressionEnvironment env, String statementName, String message) { try { env.runtime().getDeploymentService().undeploy(env.statement(statementName).getDeploymentId()); fail(); } catch (EPUndeployPreconditionException ex) { if (!message.equals("skip")) { SupportMessageAssertUtil.assertMessage(ex.getMessage(), message); } } catch (EPUndeployException ex) { fail(); } } }