HHH-7205 test assertion
This commit is contained in:
parent
58e6e47ea4
commit
4bb52196f1
|
@ -23,16 +23,17 @@
|
||||||
*/
|
*/
|
||||||
package org.hibernate.test.annotations.loader;
|
package org.hibernate.test.annotations.loader;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.fail;
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.hibernate.ObjectNotFoundException;
|
||||||
|
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.Transaction;
|
import org.hibernate.Transaction;
|
||||||
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
|
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
|
||||||
|
import org.junit.Test;
|
||||||
import static org.junit.Assert.assertEquals;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Emmanuel Bernard
|
* @author Emmanuel Bernard
|
||||||
|
@ -93,10 +94,13 @@ public class LoaderTest extends BaseCoreFunctionalTestCase {
|
||||||
Session s = openSession();
|
Session s = openSession();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
long notExistingId = 3l;
|
long notExistingId = 1l;
|
||||||
s.load( Team.class, notExistingId );
|
s.load( Team.class, notExistingId );
|
||||||
s.get( Team.class, notExistingId );
|
s.get( Team.class, notExistingId );
|
||||||
}
|
}
|
||||||
|
catch (ObjectNotFoundException e) {
|
||||||
|
fail("#get threw an ObjectNotFoundExcepton");
|
||||||
|
}
|
||||||
finally {
|
finally {
|
||||||
s.close();
|
s.close();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue