use of javax.resource.spi.ResourceAdapter in project cxf by apache.
the class TestableAssociatedManagedConnectionFactoryImpl method testSetWrongResourceAdapterThrowException.
@Test
public void testSetWrongResourceAdapterThrowException() throws Exception {
TestableAssociatedManagedConnectionFactoryImpl mci = new TestableAssociatedManagedConnectionFactoryImpl();
ResourceAdapter rai = EasyMock.createMock(ResourceAdapter.class);
try {
mci.setResourceAdapter(rai);
fail("exception expected");
} catch (ResourceException re) {
assertTrue("wrong ResourceAdapter set", re.getMessage().indexOf("ResourceAdapterImpl") != -1);
}
}
Aggregations