~ubuntu-branches/ubuntu/wily/libhibernate3-java/wily-proposed

« back to all changes in this revision

Viewing changes to test/org/hibernate/test/util/dtd/EntityResolverTest.java

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-10-14 14:43:34 UTC
  • Revision ID: james.westby@ubuntu.com-20071014144334-eamc8i0q10gs1aro
Tags: upstream-3.2.5
ImportĀ upstreamĀ versionĀ 3.2.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.hibernate.test.util.dtd;
 
2
 
 
3
import junit.framework.Test;
 
4
import junit.framework.TestSuite;
 
5
 
 
6
import org.hibernate.cfg.Configuration;
 
7
import org.hibernate.junit.UnitTestCase;
 
8
 
 
9
 
 
10
/**
 
11
 * @author Steve Ebersole
 
12
 */
 
13
public class EntityResolverTest extends UnitTestCase {
 
14
 
 
15
        public EntityResolverTest(String name) {
 
16
                super( name );
 
17
        }
 
18
 
 
19
        public static Test suite() {
 
20
                return new TestSuite( EntityResolverTest.class );
 
21
        }
 
22
 
 
23
        public void testEntityIncludeResolution() {
 
24
                // Parent.hbm.xml contains the following entity include:
 
25
                //              <!ENTITY child SYSTEM "classpath://org/hibernate/test/util/dtd/child.xml">
 
26
                // which we are expecting the Hibernate custom entity resolver to be able to resolve
 
27
                // locally via classpath lookup.
 
28
                Configuration cfg = new Configuration();
 
29
                cfg.addResource( "org/hibernate/test/util/dtd/Parent.hbm.xml" );
 
30
                cfg.buildMappings();
 
31
        }
 
32
}