org.hibernate.search.test
Class SearchTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.hibernate.testing.junit.functional.annotations.HibernateTestCase
              extended by org.hibernate.search.test.SearchTestCase
All Implemented Interfaces:
junit.framework.Test

public abstract class SearchTestCase
extends org.hibernate.testing.junit.functional.annotations.HibernateTestCase

Base class for Hibernate Search unit tests.

Author:
Emmanuel Bernard, Hardy Ferentschik

Nested Class Summary
 
Nested classes/interfaces inherited from class org.hibernate.testing.junit.functional.annotations.HibernateTestCase
org.hibernate.testing.junit.functional.annotations.HibernateTestCase.RollbackWork, org.hibernate.testing.junit.functional.annotations.HibernateTestCase.Skip
 
Field Summary
static org.apache.lucene.analysis.Analyzer keywordAnalyzer
           
protected  org.hibernate.Session session
           
protected static org.hibernate.SessionFactory sessions
           
static org.apache.lucene.analysis.Analyzer simpleAnalyzer
           
static org.apache.lucene.analysis.Analyzer standardAnalyzer
           
static org.apache.lucene.analysis.Analyzer stopAnalyzer
           
 
Fields inherited from class org.hibernate.testing.junit.functional.annotations.HibernateTestCase
cfg
 
Constructor Summary
SearchTestCase()
           
SearchTestCase(String x)
           
 
Method Summary
protected  void buildConfiguration()
           
protected  void closeResources()
           
protected  void configure(org.hibernate.cfg.Configuration cfg)
           
protected  void ensureIndexesAreEmpty()
           
protected  String[] getAnnotatedPackages()
           
protected  File getBaseIndexDir()
           
protected  org.apache.lucene.store.Directory getDirectory(Class<?> clazz)
           
protected  SearchFactory getSearchFactory()
           
protected  org.hibernate.SessionFactory getSessions()
           
 File getTargetDir()
          Returns the target directory of the build.
static org.apache.lucene.util.Version getTargetLuceneVersion()
           
protected  void handleUnclosedResources()
           
 org.hibernate.Session openSession()
           
 org.hibernate.Session openSession(org.hibernate.Interceptor interceptor)
           
protected  void setSessions(org.hibernate.SessionFactory sessions)
           
protected  void setUp()
           
 
Methods inherited from class org.hibernate.testing.junit.functional.annotations.HibernateTestCase
buildSkip, determineSkipByDialect, fullTestName, getAnnotatedClasses, getCfg, getDialect, getMappings, getXmlFiles, locateAnnotation, recreateSchema, reportSkip, runBare, runSchemaDrop, runSchemaGeneration, runTest, setCfg, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

standardAnalyzer

public static final org.apache.lucene.analysis.Analyzer standardAnalyzer

stopAnalyzer

public static final org.apache.lucene.analysis.Analyzer stopAnalyzer

simpleAnalyzer

public static final org.apache.lucene.analysis.Analyzer simpleAnalyzer

keywordAnalyzer

public static final org.apache.lucene.analysis.Analyzer keywordAnalyzer

sessions

protected static org.hibernate.SessionFactory sessions

session

protected org.hibernate.Session session
Constructor Detail

SearchTestCase

public SearchTestCase()

SearchTestCase

public SearchTestCase(String x)
Method Detail

handleUnclosedResources

protected void handleUnclosedResources()
Specified by:
handleUnclosedResources in class org.hibernate.testing.junit.functional.annotations.HibernateTestCase

closeResources

protected void closeResources()
Specified by:
closeResources in class org.hibernate.testing.junit.functional.annotations.HibernateTestCase

openSession

public org.hibernate.Session openSession()
                                  throws org.hibernate.HibernateException
Throws:
org.hibernate.HibernateException

openSession

public org.hibernate.Session openSession(org.hibernate.Interceptor interceptor)
                                  throws org.hibernate.HibernateException
Throws:
org.hibernate.HibernateException

setSessions

protected void setSessions(org.hibernate.SessionFactory sessions)

getSessions

protected org.hibernate.SessionFactory getSessions()

configure

protected void configure(org.hibernate.cfg.Configuration cfg)
Overrides:
configure in class org.hibernate.testing.junit.functional.annotations.HibernateTestCase

getDirectory

protected org.apache.lucene.store.Directory getDirectory(Class<?> clazz)

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class org.hibernate.testing.junit.functional.annotations.HibernateTestCase
Throws:
Exception

ensureIndexesAreEmpty

protected void ensureIndexesAreEmpty()

getSearchFactory

protected SearchFactory getSearchFactory()

getBaseIndexDir

protected File getBaseIndexDir()

buildConfiguration

protected void buildConfiguration()
                           throws Exception
Specified by:
buildConfiguration in class org.hibernate.testing.junit.functional.annotations.HibernateTestCase
Throws:
Exception

getAnnotatedPackages

protected String[] getAnnotatedPackages()
Overrides:
getAnnotatedPackages in class org.hibernate.testing.junit.functional.annotations.HibernateTestCase

getTargetLuceneVersion

public static org.apache.lucene.util.Version getTargetLuceneVersion()

getTargetDir

public File getTargetDir()
Returns the target directory of the build.

Returns:
the target directory of the build


Copyright © 2006-2010 Hibernate. All Rights Reserved.