Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.hibernate.test
Class TestCase  view TestCase download TestCase.java

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.hibernate.test.TestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
DatabaseSpecificTestCase

public abstract class TestCase
extends junit.framework.TestCase


Field Summary
private static org.hibernate.cfg.Configuration cfg
           
private static org.hibernate.dialect.Dialect dialect
           
private static java.lang.Class lastTestClass
           
private  org.hibernate.classic.Session session
           
private static org.hibernate.SessionFactory sessions
           
protected static org.apache.commons.logging.Log SKIP_LOG
           
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
TestCase(java.lang.String name)
           
 
Method Summary
protected  void afterSessionFactoryBuilt()
           
 boolean appliesTo(org.hibernate.dialect.Dialect dialect)
          Intended to indicate that this test class as a whole is intended for a dialect or series of dialects.
static void assertClassAssignability(java.lang.Class source, java.lang.Class target)
           
static void assertElementTypeAssignability(java.util.Collection collection, java.lang.Class clazz)
           
private  void buildSessionFactory(java.lang.String[] files)
           
protected  void configure(org.hibernate.cfg.Configuration cfg)
           
protected  boolean dialectIsCaseSensitive(java.lang.String testdescription)
           
private  boolean dialectIsNot(java.lang.Class[] dialectClasses)
           
protected  boolean dialectSupportsEmptyInList(java.lang.String testdescription)
           
protected  boolean dropAfterFailure()
           
 java.lang.String fullTestName()
           
protected  java.lang.String getBaseForMappings()
           
 java.lang.String getCacheConcurrencyStrategy()
           
protected static org.hibernate.cfg.Configuration getCfg()
           
protected  org.hibernate.dialect.Dialect getDialect()
           
 java.util.Properties getExtraProperties()
          Deprecated.  
protected abstract  java.lang.String[] getMappings()
           
protected  org.hibernate.SessionFactory getSessions()
           
 org.hibernate.classic.Session openSession()
           
 org.hibernate.classic.Session openSession(org.hibernate.Interceptor interceptor)
           
protected  boolean overrideCacheStrategy()
           
protected  boolean readCommittedIsolationMaintained(java.lang.String scenario)
           
protected  boolean recreateSchema()
           
protected  void reportSkip(java.lang.String reason, java.lang.String testDescription)
           
protected  boolean reportSkip(java.lang.String reason, java.lang.String testDescription, boolean canDoIt)
           
protected  void runTest()
          Override to run the test and assert its state.
protected static void setCfg(org.hibernate.cfg.Configuration cfg)
           
private  void setDialect(org.hibernate.dialect.Dialect dialect)
           
private  void setSessions(org.hibernate.SessionFactory sessions)
           
protected  void setUp()
          Sets up the fixture, for example, open a network connection.
protected  org.hibernate.engine.SessionFactoryImplementor sfi()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, setName, tearDown, 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

sessions

private static org.hibernate.SessionFactory sessions

cfg

private static org.hibernate.cfg.Configuration cfg

dialect

private static org.hibernate.dialect.Dialect dialect

lastTestClass

private static java.lang.Class lastTestClass

session

private org.hibernate.classic.Session session

SKIP_LOG

protected static final org.apache.commons.logging.Log SKIP_LOG
Constructor Detail

TestCase

public TestCase(java.lang.String name)
Method Detail

recreateSchema

protected boolean recreateSchema()

configure

protected void configure(org.hibernate.cfg.Configuration cfg)

buildSessionFactory

private void buildSessionFactory(java.lang.String[] files)
                          throws java.lang.Exception

afterSessionFactoryBuilt

protected void afterSessionFactoryBuilt()
                                 throws java.lang.Exception

overrideCacheStrategy

protected boolean overrideCacheStrategy()

getBaseForMappings

protected java.lang.String getBaseForMappings()

getCacheConcurrencyStrategy

public java.lang.String getCacheConcurrencyStrategy()

setUp

protected void setUp()
              throws java.lang.Exception
Description copied from class: junit.framework.TestCase
Sets up the fixture, for example, open a network connection. This method is called before a test is executed.


runTest

protected void runTest()
                throws java.lang.Throwable
Description copied from class: junit.framework.TestCase
Override to run the test and assert its state.


dropAfterFailure

protected boolean dropAfterFailure()

openSession

public org.hibernate.classic.Session openSession()
                                          throws org.hibernate.HibernateException

openSession

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

getMappings

protected abstract java.lang.String[] getMappings()

setSessions

private void setSessions(org.hibernate.SessionFactory sessions)

getSessions

protected org.hibernate.SessionFactory getSessions()

setDialect

private void setDialect(org.hibernate.dialect.Dialect dialect)

getDialect

protected org.hibernate.dialect.Dialect getDialect()

setCfg

protected static void setCfg(org.hibernate.cfg.Configuration cfg)

getCfg

protected static org.hibernate.cfg.Configuration getCfg()

getExtraProperties

public java.util.Properties getExtraProperties()
Deprecated.  


assertElementTypeAssignability

public static void assertElementTypeAssignability(java.util.Collection collection,
                                                  java.lang.Class clazz)
                                           throws junit.framework.AssertionFailedError

assertClassAssignability

public static void assertClassAssignability(java.lang.Class source,
                                            java.lang.Class target)
                                     throws junit.framework.AssertionFailedError

appliesTo

public boolean appliesTo(org.hibernate.dialect.Dialect dialect)
Intended to indicate that this test class as a whole is intended for a dialect or series of dialects. Skips here (appliesTo = false), therefore simply indicate that the given tests target a particular feature of the current database...


readCommittedIsolationMaintained

protected boolean readCommittedIsolationMaintained(java.lang.String scenario)

dialectSupportsEmptyInList

protected boolean dialectSupportsEmptyInList(java.lang.String testdescription)

dialectIsCaseSensitive

protected boolean dialectIsCaseSensitive(java.lang.String testdescription)

reportSkip

protected boolean reportSkip(java.lang.String reason,
                             java.lang.String testDescription,
                             boolean canDoIt)

reportSkip

protected void reportSkip(java.lang.String reason,
                          java.lang.String testDescription)

dialectIsNot

private boolean dialectIsNot(java.lang.Class[] dialectClasses)

fullTestName

public java.lang.String fullTestName()

sfi

protected org.hibernate.engine.SessionFactoryImplementor sfi()