use of org.mule.runtime.core.internal.context.DefaultMuleContext 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.internal.context.DefaultMuleContext in project mule by mulesoft.
the class MuleTestUtils method spyInjector.
public static Injector spyInjector(MuleContext muleContext) {
Injector spy = spy(muleContext.getInjector());
((DefaultMuleContext) muleContext).setInjector(spy);
return spy;
}
Aggregations