private static void tryInvalidDeployNoCallbackProvided(RegressionEnvironment env, String stmt) { EPCompiled compiled = env.compile(stmt); try { env.deployment().deploy(compiled); fail(); } catch (EPDeploySubstitutionParameterException ex) { assertEquals("Substitution parameters have not been provided: Statement 's0' has 1 substitution parameters", ex.getMessage()); } catch (EPDeployException ex) { throw new RuntimeException(ex); } }
Class[] required = lightweight.getStatementInformationals().getSubstitutionParamTypes(); if (required != null && required.length > 0) { throw new EPDeploySubstitutionParameterException("Statement '" + lightweight.getStatementContext().getStatementName() + "' has " + required.length + " substitution parameters"); substitutionParameterResolver.setStatementParameters(handler); } catch (Throwable t) { throw new EPDeploySubstitutionParameterException("Failed to set substitution parameter value for statement '" + lightweight.getStatementContext().getStatementName() + "': " + t.getMessage(), t); throw new EPDeploySubstitutionParameterException("Missing value for substitution parameter " + name + " for statement '" + lightweight.getStatementContext().getStatementName() + "'");
private static void tryInvalidResolver(RegressionEnvironment env, EPCompiled compiled, String expected, StatementSubstitutionParameterOption resolver) { DeploymentOptions options = new DeploymentOptions().setStatementSubstitutionParameter(resolver); try { env.deployment().deploy(compiled, options); fail(); } catch (EPDeploySubstitutionParameterException e) { SupportMessageAssertUtil.assertMessage(e.getMessage(), expected); } catch (EPDeployException e) { throw new RuntimeException(e); } }