use of javax.ejb.TransactionRolledbackLocalException in project tomee by apache.
the class ManyToManyTests method testSetCmrNull.
public void testSetCmrNull() throws Exception {
resetDB();
beginTransaction();
try {
final PlatformLocal platform = findPlatform(new Integer(1));
try {
platform.setGames(null);
fail("expected platform.setGames(null) to throw an IllegalArgumentException");
} catch (final TransactionRolledbackLocalException e) {
final Throwable cause = e.getCause();
assertNotNull("cause is null", cause);
assertTrue("cause is not a instance of IllegalArgumentException", cause instanceof IllegalArgumentException);
}
} finally {
completeTransaction();
}
}
Aggregations