org.hibernate.test.annotations
Class HibernateTestCase

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

public abstract class HibernateTestCase
extends junit.framework.TestCase

A base class for all tests.

Author:
Emmnauel Bernand, Hardy Ferentschik

Nested Class Summary
 class HibernateTestCase.RollbackWork
           
protected static class HibernateTestCase.Skip
           
 
Field Summary
protected static Configuration cfg
           
static org.slf4j.Logger log
           
 
Constructor Summary
HibernateTestCase()
           
HibernateTestCase(String x)
           
 
Method Summary
protected abstract  void buildConfiguration()
           
protected  HibernateTestCase.Skip buildSkip(Dialect dialect, String comment, String jiraKey)
           
protected abstract  void closeResources()
           
protected  void configure(Configuration cfg)
           
protected  HibernateTestCase.Skip determineSkipByDialect(Dialect dialect, Method runMethod)
           
 String fullTestName()
           
protected abstract  Class<?>[] getAnnotatedClasses()
           
protected  String[] getAnnotatedPackages()
           
protected static Configuration getCfg()
           
protected  Dialect getDialect()
           
protected  String[] getMappings()
           
protected  String[] getXmlFiles()
           
protected abstract  void handleUnclosedResources()
           
protected
<T extends Annotation>
T
locateAnnotation(Class<T> annotationClass, Method runMethod)
           
protected  boolean recreateSchema()
           
protected  void reportSkip(String reason, String testDescription)
           
 void runBare()
           
protected  void runSchemaDrop()
           
protected  void runSchemaGeneration()
           
protected  void runTest()
           
protected static void setCfg(Configuration cfg)
           
protected  void setUp()
           
protected  void 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

log

public static final org.slf4j.Logger log

cfg

protected static Configuration cfg
Constructor Detail

HibernateTestCase

public HibernateTestCase()

HibernateTestCase

public HibernateTestCase(String x)
Method Detail

runBare

public void runBare()
             throws Throwable
Overrides:
runBare in class junit.framework.TestCase
Throws:
Throwable

runTest

protected void runTest()
                throws Throwable
Overrides:
runTest in class junit.framework.TestCase
Throws:
Throwable

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
Exception

determineSkipByDialect

protected final HibernateTestCase.Skip determineSkipByDialect(Dialect dialect,
                                                              Method runMethod)
                                                       throws Exception
Throws:
Exception

locateAnnotation

protected <T extends Annotation> T locateAnnotation(Class<T> annotationClass,
                                                    Method runMethod)

buildSkip

protected HibernateTestCase.Skip buildSkip(Dialect dialect,
                                           String comment,
                                           String jiraKey)

fullTestName

public String fullTestName()

buildConfiguration

protected abstract void buildConfiguration()
                                    throws Exception
Throws:
Exception

getAnnotatedClasses

protected abstract Class<?>[] getAnnotatedClasses()

getMappings

protected String[] getMappings()

handleUnclosedResources

protected abstract void handleUnclosedResources()

closeResources

protected abstract void closeResources()

getAnnotatedPackages

protected String[] getAnnotatedPackages()

getXmlFiles

protected String[] getXmlFiles()

getDialect

protected Dialect getDialect()

setCfg

protected static void setCfg(Configuration cfg)

getCfg

protected static Configuration getCfg()

configure

protected void configure(Configuration cfg)

recreateSchema

protected boolean recreateSchema()

runSchemaGeneration

protected void runSchemaGeneration()

runSchemaDrop

protected void runSchemaDrop()

reportSkip

protected void reportSkip(String reason,
                          String testDescription)


Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.