use of org.mule.runtime.core.api.config.DefaultMuleConfiguration in project mule by mulesoft.
the class ApplicationMuleContextBuilder method createMuleConfiguration.
@Override
protected DefaultMuleConfiguration createMuleConfiguration() {
final DefaultMuleConfiguration configuration = new DefaultMuleConfiguration(true);
initializeFromProperties(configuration);
configuration.setId(appName);
final String encoding = defaultEncoding;
if (!isBlank(encoding)) {
configuration.setDefaultEncoding(encoding);
}
return configuration;
}
use of org.mule.runtime.core.api.config.DefaultMuleConfiguration in project mule by mulesoft.
the class FlowProcessingStrategyTestCase method processingStrategySetBySystemPropertyOverridesDefault.
@Test
public void processingStrategySetBySystemPropertyOverridesDefault() throws Exception {
testWithSystemProperty(ProcessingStrategyFactory.class.getName(), TestProcessingStrategyFactory.class.getName(), () -> {
MuleConfiguration muleConfiguration = new DefaultMuleConfiguration();
when(muleContext.getConfiguration()).thenReturn(muleConfiguration);
createFlow(null);
assertEquals(flow.getProcessingStrategy().getClass(), TestProcessingStrategy.class);
});
}
use of org.mule.runtime.core.api.config.DefaultMuleConfiguration in project mule by mulesoft.
the class PipelineMessageNotificationTestCase method createMocks.
@Before
public void createMocks() throws Exception {
muleContext.dispose();
muleContext = mockContextWithServices();
when(muleContext.getStatistics()).thenReturn(new AllStatistics());
when(muleContext.getConfiguration()).thenReturn(new DefaultMuleConfiguration());
notificationFirer = ((MuleContextWithRegistries) muleContext).getRegistry().lookupObject(NotificationDispatcher.class);
when(muleContext.getDefaultErrorHandler(empty())).thenReturn(new ErrorHandlerFactory().createDefault(notificationFirer));
mockErrorTypeLocator();
when(muleContext.getTransformationService()).thenReturn(new ExtendedTransformationService(muleContext));
}
use of org.mule.runtime.core.api.config.DefaultMuleConfiguration in project mule by mulesoft.
the class LocalTxQueueTransactionRecovererTestCase method configureMuleContext.
@Override
protected void configureMuleContext(MuleContextBuilder contextBuilder) {
DefaultMuleConfiguration muleConfiguration = new DefaultMuleConfiguration();
muleConfiguration.setWorkingDirectory(temporaryFolder.getRoot().getAbsolutePath());
contextBuilder.setMuleConfiguration(muleConfiguration);
}
use of org.mule.runtime.core.api.config.DefaultMuleConfiguration in project mule by mulesoft.
the class DomainMuleContextBuilder method getMuleConfiguration.
@Override
protected MuleConfiguration getMuleConfiguration() {
DefaultMuleConfiguration defaultMuleConfiguration = new DefaultMuleConfiguration(true);
defaultMuleConfiguration.setDomainId(domainId);
defaultMuleConfiguration.setId(domainId);
return defaultMuleConfiguration;
}
Aggregations