Search in sources :

Example 1 with TestTransactionManagerFactory

use of org.mule.tck.testmodels.mule.TestTransactionManagerFactory 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())));
}
Also used : DefaultMuleContextFactory(org.mule.runtime.core.api.context.DefaultMuleContextFactory) DefaultMuleContext(org.mule.runtime.core.internal.context.DefaultMuleContext) TransactionManagerFactoryBean(org.mule.runtime.config.internal.factories.TransactionManagerFactoryBean) TransactionManager(javax.transaction.TransactionManager) DefaultsConfigurationBuilder(org.mule.runtime.core.internal.config.builders.DefaultsConfigurationBuilder) TestServicesConfigurationBuilder(org.mule.tck.config.TestServicesConfigurationBuilder) TestTransactionManagerFactory(org.mule.tck.testmodels.mule.TestTransactionManagerFactory) Test(org.junit.Test)

Aggregations

TransactionManager (javax.transaction.TransactionManager)1 Test (org.junit.Test)1 TransactionManagerFactoryBean (org.mule.runtime.config.internal.factories.TransactionManagerFactoryBean)1 DefaultMuleContextFactory (org.mule.runtime.core.api.context.DefaultMuleContextFactory)1 DefaultsConfigurationBuilder (org.mule.runtime.core.internal.config.builders.DefaultsConfigurationBuilder)1 DefaultMuleContext (org.mule.runtime.core.internal.context.DefaultMuleContext)1 TestServicesConfigurationBuilder (org.mule.tck.config.TestServicesConfigurationBuilder)1 TestTransactionManagerFactory (org.mule.tck.testmodels.mule.TestTransactionManagerFactory)1