Search in sources :

Example 1 with TestConfig

use of org.mule.runtime.module.extension.internal.runtime.execution.ConfigurationObjectBuilderTestCase.TestConfig in project mule by mulesoft.

the class ConfigurationInstanceFactoryTestCase method before.

@Before
public void before() throws Exception {
    mockConfigurationInstance(configurationModel, new TestConfig());
    mockInterceptors(configurationModel, asList(() -> interceptor1, () -> interceptor2));
    when(configurationModel.getOperationModels()).thenReturn(ImmutableList.of());
    when(configurationModel.getSourceModels()).thenReturn(ImmutableList.of());
    when(extensionModel.getOperationModels()).thenReturn(asList(operationModel));
    when(extensionModel.getSourceModels()).thenReturn(asList(sourceModel));
    when(operationModel.getModelProperty(ConnectivityModelProperty.class)).thenReturn(of(new ConnectivityModelProperty(Banana.class)));
    when(sourceModel.getModelProperty(ConnectivityModelProperty.class)).thenReturn(of(new ConnectivityModelProperty(Banana.class)));
    when(sourceModel.getErrorCallback()).thenReturn(of(sourceCallbackModel));
    when(sourceModel.getSuccessCallback()).thenReturn(of(sourceCallbackModel));
    when(muleContext.getConfiguration().getDefaultEncoding()).thenReturn(ENCODING);
    resolverSet = ConfigurationObjectBuilderTestCase.createResolverSet();
    factory = new ConfigurationInstanceFactory<>(extensionModel, configurationModel, resolverSet, new ReflectionCache(), muleContext);
}
Also used : ConnectivityModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.ConnectivityModelProperty) TestConfig(org.mule.runtime.module.extension.internal.runtime.execution.ConfigurationObjectBuilderTestCase.TestConfig) ReflectionCache(org.mule.runtime.module.extension.internal.util.ReflectionCache) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 ConnectivityModelProperty (org.mule.runtime.module.extension.internal.loader.java.property.ConnectivityModelProperty)1 TestConfig (org.mule.runtime.module.extension.internal.runtime.execution.ConfigurationObjectBuilderTestCase.TestConfig)1 ReflectionCache (org.mule.runtime.module.extension.internal.util.ReflectionCache)1