use of org.mule.runtime.core.api.context.DefaultMuleContextFactory in project mule by mulesoft.
the class OptionalObjectsIgnoredTestCase method before.
@Before
public void before() throws Exception {
muleContext = (MuleContextWithRegistries) new DefaultMuleContextFactory().createMuleContext(testServicesConfigurationBuilder, new SpringXmlConfigurationBuilder(new String[0], emptyMap()));
muleContext.start();
muleContext.getRegistry().lookupByType(Calendar.class);
}
use of org.mule.runtime.core.api.context.DefaultMuleContextFactory in project mule by mulesoft.
the class TransactionManagerFactoryBeanTestCase method registerTransactionManager.
@Test
public void registerTransactionManager() throws Exception {
DefaultMuleContext context = (DefaultMuleContext) new DefaultMuleContextFactory().createMuleContext(new TestServicesConfigurationBuilder(), new DefaultsConfigurationBuilder());
TransactionManagerFactoryBean txMgrFB = new TransactionManagerFactoryBean();
txMgrFB.setMuleContext(context);
txMgrFB.setTxManagerFactory(new TestTransactionManagerFactory());
TransactionManager transactionManager = txMgrFB.getObject();
assertThat(transactionManager, not(is(IsNull.nullValue())));
}
use of org.mule.runtime.core.api.context.DefaultMuleContextFactory in project mule by mulesoft.
the class ApplicationContextBuilder method doBuildContext.
protected MuleContext doBuildContext() throws Exception {
MuleContext context;
MuleContextFactory muleContextFactory = new DefaultMuleContextFactory();
List<ConfigurationBuilder> builders = new ArrayList<>();
builders.add(getAppBuilder(this.applicationResources));
addBuilders(builders);
configureMuleContext(muleContextBuilder);
context = muleContextFactory.createMuleContext(builders, muleContextBuilder);
return context;
}
Aggregations