Search in sources :

Example 1 with DmnScriptEngineResolver

use of org.camunda.bpm.dmn.engine.impl.spi.el.DmnScriptEngineResolver 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));
}
Also used : DmnScriptEngineResolver(org.camunda.bpm.dmn.engine.impl.spi.el.DmnScriptEngineResolver) DefaultDmnEngineConfiguration(org.camunda.bpm.dmn.engine.impl.DefaultDmnEngineConfiguration) ProcessEngineConfigurationImpl(org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl) Test(org.junit.Test)

Aggregations

DefaultDmnEngineConfiguration (org.camunda.bpm.dmn.engine.impl.DefaultDmnEngineConfiguration)1 DmnScriptEngineResolver (org.camunda.bpm.dmn.engine.impl.spi.el.DmnScriptEngineResolver)1 ProcessEngineConfigurationImpl (org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl)1 Test (org.junit.Test)1