initial add of EbeanORM server based on v2.8.1

This commit is contained in:
rbygrave
2012-09-14 00:40:39 +12:00
parent 2b74d0f9d9
commit 96ce4c0ddf
1188 changed files with 135034 additions and 0 deletions
@@ -0,0 +1,36 @@
package com.avaje.tests.transaction;
import junit.framework.Assert;
import junit.framework.TestCase;
import com.avaje.ebean.Ebean;
import com.avaje.ebean.TxRunnable;
public class TestNested extends TestCase {
public void test() {
try {
Ebean.execute(new TxRunnable() {
public void run() {
willFail();
}
});
} catch (RuntimeException e){
Assert.assertEquals(e.getMessage(), "test rollback");
}
}
private void willFail() {
Ebean.execute(new TxRunnable() {
public void run() {
String msg = "test rollback";
throw new RuntimeException(msg);
}
});
}
}