FileDocCategorySizeDatePackage
CacheableFileTest.javaAPI DocHibernate 3.2.51095Tue Dec 12 16:22:26 GMT 2006org.hibernate.test.cfg

CacheableFileTest

public class CacheableFileTest extends org.hibernate.junit.UnitTestCase
{@inheritDoc}
author
Steve Ebersole

Fields Summary
public static final String
MAPPING
private File
mappingFile
Constructors Summary
public CacheableFileTest(String string)


	   
		super( string );
	
Methods Summary
protected voidsetUp()

		super.setUp();
		mappingFile = new File( getClass().getClassLoader().getResource( MAPPING ).getFile() );
		assertTrue( mappingFile.exists() );
		File cached = new File( mappingFile.getParentFile(), mappingFile.getName() + ".bin" );
		if ( cached.exists() ) {
			cached.delete();
		}
	
protected voidtearDown()

		mappingFile = null;
		super.tearDown();
	
public voidtestCachedFiles()

		Configuration cfg = new Configuration();
		cfg.addCacheableFile( mappingFile );
		Configuration cfg2 = new Configuration();
		cfg2.addCacheableFile( mappingFile );