use of org.eclipse.persistence.exceptions.EntityManagerSetupException in project eclipselink by eclipse-ee4j.
the class TestSchemaGen method testJTASchemaGenerationWithoutProps.
/**
* This test checks the inverse of
* TestSchemaGen.testJTASchemaGenerationWithProps() Without the 2.1
* properties defined, generating schema should fail with no JTA-DS defined.
*/
@Test
public void testJTASchemaGenerationWithoutProps() throws Exception {
Exception e = null;
try {
Persistence.generateSchema(jtaPersistenceUnit, new Properties());
} catch (Exception pe) {
e = pe;
}
Assert.assertNotNull(e);
Throwable base = getBaseException(e);
Assert.assertTrue(base instanceof EntityManagerSetupException);
}
Aggregations