use of org.mule.tck.config.TestServicesConfigurationBuilder in project mule by mulesoft.
the class ArtifactContextBuilderTestCase method emptyBuilder.
@Test
public void emptyBuilder() throws Exception {
MuleContext muleContext = newBuilder(new TestServicesConfigurationBuilder()).setExecutionClassloader(currentThread().getContextClassLoader()).setClassLoaderRepository(mock(ClassLoaderRepository.class)).build().getMuleContext();
assertThat(muleContext, notNullValue());
assertThat(muleContext.isInitialised(), is(true));
muleContext.start();
assertThat(muleContext.isStarted(), is(true));
}
use of org.mule.tck.config.TestServicesConfigurationBuilder 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())));
}
Aggregations