mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-17 08:35:13 +00:00
HHH-4498
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@17779 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
6613dce0cb
commit
95285ad109
@ -75,7 +75,8 @@
|
||||
public class JPAOverridenAnnotationReaderTest extends TestCase {
|
||||
public void testMappedSuperclassAnnotations() throws Exception {
|
||||
XMLContext context = buildContext(
|
||||
"org/hibernate/test/annotations/reflection/metadata-complete.xml" );
|
||||
"org/hibernate/test/annotations/reflection/metadata-complete.xml"
|
||||
);
|
||||
JPAOverridenAnnotationReader reader = new JPAOverridenAnnotationReader( Organization.class, context );
|
||||
assertTrue( reader.isAnnotationPresent( MappedSuperclass.class ) );
|
||||
}
|
||||
@ -212,7 +213,8 @@ public void testEntityRelatedAnnotations() throws Exception {
|
||||
|
||||
public void testEntityRelatedAnnotationsMetadataComplete() throws Exception {
|
||||
XMLContext context = buildContext(
|
||||
"org/hibernate/test/annotations/reflection/metadata-complete.xml" );
|
||||
"org/hibernate/test/annotations/reflection/metadata-complete.xml"
|
||||
);
|
||||
JPAOverridenAnnotationReader reader = new JPAOverridenAnnotationReader( Administration.class, context );
|
||||
assertNotNull( reader.getAnnotation( Entity.class ) );
|
||||
assertEquals(
|
||||
@ -269,7 +271,8 @@ public void testIdRelatedAnnotations() throws Exception {
|
||||
assertEquals( TemporalType.DATE, reader.getAnnotation( Temporal.class ).value() );
|
||||
|
||||
context = buildContext(
|
||||
"org/hibernate/test/annotations/reflection/metadata-complete.xml" );
|
||||
"org/hibernate/test/annotations/reflection/metadata-complete.xml"
|
||||
);
|
||||
method = Administration.class.getDeclaredMethod( "getId" );
|
||||
reader = new JPAOverridenAnnotationReader( method, context );
|
||||
assertNotNull(
|
||||
@ -295,7 +298,8 @@ public void testIdRelatedAnnotations() throws Exception {
|
||||
|
||||
public void testBasicRelatedAnnotations() throws Exception {
|
||||
XMLContext context = buildContext(
|
||||
"org/hibernate/test/annotations/reflection/metadata-complete.xml" );
|
||||
"org/hibernate/test/annotations/reflection/metadata-complete.xml"
|
||||
);
|
||||
Field field = BusTrip.class.getDeclaredField( "status" );
|
||||
JPAOverridenAnnotationReader reader = new JPAOverridenAnnotationReader( field, context );
|
||||
assertNotNull( reader.getAnnotation( Enumerated.class ) );
|
||||
@ -354,7 +358,8 @@ public void testAssociationRelatedAnnotations() throws Exception {
|
||||
assertEquals( "test", reader.getAnnotation( OneToOne.class ).mappedBy() );
|
||||
|
||||
context = buildContext(
|
||||
"org/hibernate/test/annotations/reflection/metadata-complete.xml" );
|
||||
"org/hibernate/test/annotations/reflection/metadata-complete.xml"
|
||||
);
|
||||
field = BusTrip.class.getDeclaredField( "players" );
|
||||
reader = new JPAOverridenAnnotationReader( field, context );
|
||||
assertNotNull( reader.getAnnotation( OneToMany.class ) );
|
||||
|
@ -23,7 +23,8 @@ public void testAll() throws Exception {
|
||||
XMLHelper xmlHelper = new XMLHelper();
|
||||
ClassLoader cl = Thread.currentThread().getContextClassLoader();
|
||||
InputStream is = cl.getResourceAsStream(
|
||||
"org/hibernate/test/annotations/reflection/orm.xml" );
|
||||
"org/hibernate/test/annotations/reflection/orm.xml"
|
||||
);
|
||||
assertNotNull( "ORM.xml not found", is );
|
||||
XMLContext context = new XMLContext();
|
||||
List errors = new ArrayList();
|
||||
|
@ -8,6 +8,7 @@
|
||||
* @author Emmanuel Bernard
|
||||
*/
|
||||
public class HbmWithIdentityTest extends TestCase {
|
||||
|
||||
public void testManyToOneAndInterface() throws Exception {
|
||||
Session s = openSession();
|
||||
s.getTransaction().begin();
|
||||
@ -27,8 +28,6 @@ protected boolean runForCurrentDialect() {
|
||||
return super.runForCurrentDialect() && getDialect().supportsIdentityColumns();
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected Class[] getMappings() {
|
||||
return new Class[] {
|
||||
Sky.class,
|
||||
@ -41,7 +40,8 @@ protected Class[] getMappings() {
|
||||
protected String[] getXmlFiles() {
|
||||
return new String[] {
|
||||
"org/hibernate/test/annotations/xml/hbm/A.hbm.xml",
|
||||
"org/hibernate/test/annotations/xml/hbm/B.hbm.xml"
|
||||
"org/hibernate/test/annotations/xml/hbm/B.hbm.xml",
|
||||
"org/hibernate/test/annotations/xml/hbm/CloudType.hbm.xml"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user