TouK OpenSource Projects

pl.touk.ormtest
Class MysqlIbatisSpringTxTestRule

java.lang.Object
  extended by pl.touk.ormtest.SpringTxTestRule
      extended by pl.touk.ormtest.IbatisSpringTxTestRule
          extended by pl.touk.ormtest.MysqlIbatisSpringTxTestRule
All Implemented Interfaces:
org.junit.rules.TestRule

public class MysqlIbatisSpringTxTestRule
extends IbatisSpringTxTestRule


Field Summary
 
Fields inherited from class pl.touk.ormtest.SpringTxTestRule
threadsPerTestClass, txManagers, txStatuses
 
Constructor Summary
MysqlIbatisSpringTxTestRule()
           
MysqlIbatisSpringTxTestRule(String schema, String initScript, String sqlMapConfig)
           
 
Method Summary
protected  DataSource dataSource()
          Can be overridden in subclasses and should return a data source.
static void resetThreadsForCurrentTestClass()
           
protected static void resetThreadsForCurrentTestClass(boolean hardReset)
           
static void scheduleMysqlStop()
           
static void setInitScript(String initScript)
           
static void setSchema(String schema)
           
static void setSchemasAndInitScripts(String... schemaAndInitScriptArray)
           
static void setSqlMapConfig(String... sqlMapConfig)
           
static void stopMysql()
           
 
Methods inherited from class pl.touk.ormtest.IbatisSpringTxTestRule
ensureTemplateInitialized, getSqlMapClientTemplate, getSqlMapConfig, setSqlMapConfig, sqlMapClient, sqlMapClientFactoryBean
 
Methods inherited from class pl.touk.ormtest.SpringTxTestRule
apply, commitTransactionAndBeginNewOne, findInvokingTestClass, getThreads, rollBackTransactionAndBeginNewOne
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MysqlIbatisSpringTxTestRule

public MysqlIbatisSpringTxTestRule(String schema,
                                   String initScript,
                                   String sqlMapConfig)

MysqlIbatisSpringTxTestRule

public MysqlIbatisSpringTxTestRule()
Method Detail

setSchema

public static void setSchema(String schema)

setInitScript

public static void setInitScript(String initScript)

setSqlMapConfig

public static void setSqlMapConfig(String... sqlMapConfig)

scheduleMysqlStop

public static void scheduleMysqlStop()

dataSource

protected DataSource dataSource()
Description copied from class: SpringTxTestRule
Can be overridden in subclasses and should return a data source. The default implementation of this method returns a data source for in-memory H2 database. This method retuns different data sources if it is invoked in different threads (database name contains hash code of the current thread).

Overrides:
dataSource in class SpringTxTestRule
Returns:
data source to be used during tests

resetThreadsForCurrentTestClass

public static void resetThreadsForCurrentTestClass()

resetThreadsForCurrentTestClass

protected static void resetThreadsForCurrentTestClass(boolean hardReset)

stopMysql

public static void stopMysql()

setSchemasAndInitScripts

public static void setSchemasAndInitScripts(String... schemaAndInitScriptArray)

TouK sp. z o.o. s.k.a.

Copyright © 2010–2015 TouK s.k.a.. All rights reserved.