use of org.camunda.bpm.dmn.engine.impl.metrics.DefaultEngineMetricCollector in project camunda-engine-dmn by camunda.
the class DefaultDmnEngineConfigurationApiTest method shouldInitDecisionTableEvaluationListeners.
@Test
public void shouldInitDecisionTableEvaluationListeners() {
ArrayList<DmnDecisionTableEvaluationListener> preListeners = new ArrayList<DmnDecisionTableEvaluationListener>();
preListeners.add(new DefaultEngineMetricCollector());
ArrayList<DmnDecisionTableEvaluationListener> postListeners = new ArrayList<DmnDecisionTableEvaluationListener>();
postListeners.add(new DefaultEngineMetricCollector());
configuration.customPreDecisionTableEvaluationListeners(preListeners).customPostDecisionTableEvaluationListeners(postListeners).buildEngine();
ArrayList<DmnDecisionTableEvaluationListener> expectedListeners = new ArrayList<DmnDecisionTableEvaluationListener>();
expectedListeners.addAll(preListeners);
expectedListeners.addAll(postListeners);
assertThat(configuration.getDecisionTableEvaluationListeners()).containsExactlyElementsOf(expectedListeners);
}
use of org.camunda.bpm.dmn.engine.impl.metrics.DefaultEngineMetricCollector in project camunda-engine-dmn by camunda.
the class DefaultDmnEngineConfigurationApiTest method shouldSetCustomPostDecisionTableEvaluationListeners.
@Test
public void shouldSetCustomPostDecisionTableEvaluationListeners() {
configuration.setCustomPostDecisionTableEvaluationListeners(null);
assertThat(configuration.getCustomPostDecisionTableEvaluationListeners()).isNull();
configuration.setCustomPostDecisionTableEvaluationListeners(Collections.<DmnDecisionTableEvaluationListener>emptyList());
assertThat(configuration.getCustomPostDecisionTableEvaluationListeners()).isEmpty();
ArrayList<DmnDecisionTableEvaluationListener> listeners = new ArrayList<DmnDecisionTableEvaluationListener>();
listeners.add(new DefaultEngineMetricCollector());
listeners.add(new DefaultEngineMetricCollector());
configuration.setCustomPostDecisionTableEvaluationListeners(listeners);
assertThat(configuration.getCustomPostDecisionTableEvaluationListeners()).containsExactlyElementsOf(listeners);
}
use of org.camunda.bpm.dmn.engine.impl.metrics.DefaultEngineMetricCollector in project camunda-engine-dmn by camunda.
the class DefaultDmnEngineConfigurationApiTest method shouldSetCustomPreDecisionTableEvaluationListeners.
@Test
public void shouldSetCustomPreDecisionTableEvaluationListeners() {
configuration.setCustomPreDecisionTableEvaluationListeners(null);
assertThat(configuration.getCustomPreDecisionTableEvaluationListeners()).isNull();
configuration.setCustomPreDecisionTableEvaluationListeners(Collections.<DmnDecisionTableEvaluationListener>emptyList());
assertThat(configuration.getCustomPreDecisionTableEvaluationListeners()).isEmpty();
ArrayList<DmnDecisionTableEvaluationListener> listeners = new ArrayList<DmnDecisionTableEvaluationListener>();
listeners.add(new DefaultEngineMetricCollector());
listeners.add(new DefaultEngineMetricCollector());
configuration.setCustomPreDecisionTableEvaluationListeners(listeners);
assertThat(configuration.getCustomPreDecisionTableEvaluationListeners()).containsExactlyElementsOf(listeners);
}
use of org.camunda.bpm.dmn.engine.impl.metrics.DefaultEngineMetricCollector in project camunda-engine-dmn by camunda.
the class DmnEngineConfigurationApiTest method shouldSetFluentCustomPreDecisionTableEvaluationListeners.
@Test
public void shouldSetFluentCustomPreDecisionTableEvaluationListeners() {
configuration.customPreDecisionTableEvaluationListeners(null);
assertThat(configuration.getCustomPreDecisionTableEvaluationListeners()).isNull();
configuration.customPreDecisionTableEvaluationListeners(Collections.<DmnDecisionTableEvaluationListener>emptyList());
assertThat(configuration.getCustomPreDecisionTableEvaluationListeners()).isEmpty();
ArrayList<DmnDecisionTableEvaluationListener> listeners = new ArrayList<DmnDecisionTableEvaluationListener>();
listeners.add(new DefaultEngineMetricCollector());
listeners.add(new DefaultEngineMetricCollector());
configuration.customPreDecisionTableEvaluationListeners(listeners);
assertThat(configuration.getCustomPreDecisionTableEvaluationListeners()).containsExactlyElementsOf(listeners);
}
use of org.camunda.bpm.dmn.engine.impl.metrics.DefaultEngineMetricCollector in project camunda-engine-dmn by camunda.
the class DmnEngineConfigurationApiTest method shouldSetEngineMetricCollector.
@Test
public void shouldSetEngineMetricCollector() {
configuration.setEngineMetricCollector(null);
assertThat(configuration.getEngineMetricCollector()).isNull();
DefaultEngineMetricCollector metricCollector = new DefaultEngineMetricCollector();
configuration.setEngineMetricCollector(metricCollector);
assertThat(configuration.getEngineMetricCollector()).isEqualTo(metricCollector);
}
Aggregations