use of org.camunda.bpm.dmn.engine.impl.DefaultDmnEngineConfiguration in project camunda-bpm-platform by camunda.
the class DmnEngineConfigurationTest method getConfigurationOfDmnEngine.
protected DefaultDmnEngineConfiguration getConfigurationOfDmnEngine() {
ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl) engine.getProcessEngineConfiguration();
DmnEngine dmnEngine = processEngineConfiguration.getDmnEngine();
return (DefaultDmnEngineConfiguration) dmnEngine.getConfiguration();
}
use of org.camunda.bpm.dmn.engine.impl.DefaultDmnEngineConfiguration in project camunda-bpm-platform by camunda.
the class DmnEngineConfigurationTest method setScriptEngineResolver.
@Test
public void setScriptEngineResolver() {
// given a DMN engine configuration with script engine resolver
DefaultDmnEngineConfiguration dmnEngineConfiguration = (DefaultDmnEngineConfiguration) DmnEngineConfiguration.createDefaultDmnEngineConfiguration();
DmnScriptEngineResolver scriptEngineResolver = mock(DmnScriptEngineResolver.class);
dmnEngineConfiguration.setScriptEngineResolver(scriptEngineResolver);
ProcessEngineConfigurationImpl processEngineConfiguration = createProcessEngineConfiguration();
processEngineConfiguration.setDmnEngineConfiguration(dmnEngineConfiguration);
// when the engine is initialized
engine = processEngineConfiguration.buildProcessEngine();
// then the script engine resolver should be set on the DMN engine
assertThat(getConfigurationOfDmnEngine().getScriptEngineResolver(), is(scriptEngineResolver));
}
use of org.camunda.bpm.dmn.engine.impl.DefaultDmnEngineConfiguration in project camunda-bpm-platform by camunda.
the class DmnEngineConfigurationTest method setDefaultInputExpressionLanguage.
@Test
public void setDefaultInputExpressionLanguage() {
// given a DMN engine configuration with default expression language
DefaultDmnEngineConfiguration dmnEngineConfiguration = (DefaultDmnEngineConfiguration) DmnEngineConfiguration.createDefaultDmnEngineConfiguration();
dmnEngineConfiguration.setDefaultInputExpressionExpressionLanguage("groovy");
ProcessEngineConfigurationImpl processEngineConfiguration = createProcessEngineConfiguration();
processEngineConfiguration.setDmnEngineConfiguration(dmnEngineConfiguration);
// when the engine is initialized
engine = processEngineConfiguration.buildProcessEngine();
// then the default expression language should be set on the DMN engine
assertThat(getConfigurationOfDmnEngine().getDefaultInputExpressionExpressionLanguage(), is("groovy"));
}
use of org.camunda.bpm.dmn.engine.impl.DefaultDmnEngineConfiguration in project camunda-engine-dmn by camunda.
the class CustomDataTypeTransformerRegistryTest method getDmnEngineConfiguration.
@Override
public DmnEngineConfiguration getDmnEngineConfiguration() {
DefaultDmnEngineConfiguration configuration = new DefaultDmnEngineConfiguration();
configuration.getTransformer().setDataTypeTransformerRegistry(new CustomDataTypeTransformerRegistry());
return configuration;
}
use of org.camunda.bpm.dmn.engine.impl.DefaultDmnEngineConfiguration in project camunda-engine-dmn by camunda.
the class DataTypeTransformerIntegrationTest method getDmnEngineConfiguration.
@Override
public DmnEngineConfiguration getDmnEngineConfiguration() {
DefaultDmnEngineConfiguration configuration = new DefaultDmnEngineConfiguration();
dataTypeTransformerMock = mock(DmnDataTypeTransformer.class);
when(dataTypeTransformerMock.transform(any())).thenReturn(TRANSFORMED_VALUE);
DmnDataTypeTransformerRegistry dataTypeTransformerRegistry = mock(DmnDataTypeTransformerRegistry.class);
when(dataTypeTransformerRegistry.getTransformer(anyString())).thenReturn(dataTypeTransformerMock);
configuration.getTransformer().setDataTypeTransformerRegistry(dataTypeTransformerRegistry);
return configuration;
}
Aggregations