Search in sources :

Example 1 with LifecycleAwareConfigurationInstance

use of org.mule.runtime.module.extension.internal.runtime.config.LifecycleAwareConfigurationInstance in project mule by mulesoft.

the class DefaultExecutionContextTestCase method before.

@Before
public void before() {
    configuration = new LifecycleAwareConfigurationInstance(CONFIG_NAME, configurationModel, configurationInstance, configurationState, emptyList(), empty());
    Map<String, Object> parametersMap = new HashMap<>();
    parametersMap.put(PARAM_NAME, VALUE);
    when(resolverSetResult.asMap()).thenReturn(parametersMap);
    operationContext = new DefaultExecutionContext<>(extensionModel, of(configuration), resolverSetResult.asMap(), operationModel, event, cursorProviderFactory, streamingManager, component, retryPolicyTemplate, IMMEDIATE_SCHEDULER, muleContext);
}
Also used : LifecycleAwareConfigurationInstance(org.mule.runtime.module.extension.internal.runtime.config.LifecycleAwareConfigurationInstance) HashMap(java.util.HashMap) Before(org.junit.Before)

Example 2 with LifecycleAwareConfigurationInstance

use of org.mule.runtime.module.extension.internal.runtime.config.LifecycleAwareConfigurationInstance in project mule by mulesoft.

the class ReflectiveMethodOperationExecutorTestCase method init.

@Before
public void init() throws Exception {
    initHeisenberg();
    configurationInstance = new LifecycleAwareConfigurationInstance(CONFIG_NAME, configurationModel, config, configurationState, emptyList(), empty());
    when(muleEvent.getMessage().getPayload()).thenReturn(new TypedValue<>(null, DATA_TYPE));
    when(operationModel.getModelProperty(ParameterGroupModelProperty.class)).thenReturn(empty());
    operationContext = new DefaultExecutionContext(extensionModel, of(configurationInstance), parameters.asMap(), operationModel, muleEvent, cursorProviderFactory, streamingManager, component, retryPolicyTemplate, IMMEDIATE_SCHEDULER, muleContext);
    operationContext = spy(operationContext);
}
Also used : LifecycleAwareConfigurationInstance(org.mule.runtime.module.extension.internal.runtime.config.LifecycleAwareConfigurationInstance) DefaultExecutionContext(org.mule.runtime.module.extension.internal.runtime.DefaultExecutionContext) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)2 LifecycleAwareConfigurationInstance (org.mule.runtime.module.extension.internal.runtime.config.LifecycleAwareConfigurationInstance)2 HashMap (java.util.HashMap)1 DefaultExecutionContext (org.mule.runtime.module.extension.internal.runtime.DefaultExecutionContext)1