HHH-7205 test assertion

This commit is contained in:
Brett Meyer 2014-02-10 16:24:37 -05:00
parent 2ecd96158e
commit acd7c3046f
1 changed files with 9 additions and 5 deletions

View File

@ -23,16 +23,17 @@
*/
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.Set;
import org.junit.Test;
import org.hibernate.ObjectNotFoundException;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
/**
* @author Emmanuel Bernard
@ -93,10 +94,13 @@ public class LoaderTest extends BaseCoreFunctionalTestCase {
Session s = openSession();
try {
long notExistingId = 3l;
long notExistingId = 1l;
s.load( Team.class, notExistingId );
s.get( Team.class, notExistingId );
}
catch (ObjectNotFoundException e) {
fail("#get threw an ObjectNotFoundExcepton");
}
finally {
s.close();
}