entityresolvertest.java

来自「hibernate 开源框架的代码 jar包希望大家能喜欢」· Java 代码 · 共 33 行

JAVA
33
字号
package org.hibernate.test.util.dtd;

import junit.framework.Test;
import junit.framework.TestSuite;

import org.hibernate.cfg.Configuration;
import org.hibernate.junit.UnitTestCase;


/**
 * @author Steve Ebersole
 */
public class EntityResolverTest extends UnitTestCase {

	public EntityResolverTest(String name) {
		super( name );
	}

	public static Test suite() {
		return new TestSuite( EntityResolverTest.class );
	}

	public void testEntityIncludeResolution() {
		// Parent.hbm.xml contains the following entity include:
		//		<!ENTITY child SYSTEM "classpath://org/hibernate/test/util/dtd/child.xml">
		// which we are expecting the Hibernate custom entity resolver to be able to resolve
		// locally via classpath lookup.
		Configuration cfg = new Configuration();
		cfg.addResource( "org/hibernate/test/util/dtd/Parent.hbm.xml" );
		cfg.buildMappings();
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?