org.nuiton.topia
Class TestHelper

java.lang.Object
  extended by org.nuiton.topia.TestHelper

public class TestHelper
extends Object

Helper for all topia tests.

Since:
2.5
Author:
tchemit

Field Summary
static String DEFAULT_CONFIGURATION_LOCATION
           
protected static File dirDatabase
           
protected static File targetdir
           
protected static File testBasedir
           
 
Constructor Summary
TestHelper()
           
 
Method Summary
static String getDbName(File testDirectory, String dbname)
           
static File getTestBasedir(Class<?> testClass)
           
static File getTestWorkdir()
           
static org.nuiton.topia.TopiaContext initTopiaContext(File testDirectory, String dbname)
           
static org.nuiton.topia.TopiaContext initTopiaContext(File testDirectory, String dbPropertiesPath, String dbname)
           
static Properties initTopiaContextConfiguration(File testDirectory, String dbname)
           
static Properties initTopiaContextConfiguration(File testDirectory, String dbPropertiesPath, String dbname)
           
static Properties loadHibernateConfiguration(String dbPropertiesPath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

testBasedir

protected static File testBasedir

targetdir

protected static File targetdir

dirDatabase

protected static File dirDatabase

DEFAULT_CONFIGURATION_LOCATION

public static final String DEFAULT_CONFIGURATION_LOCATION
See Also:
Constant Field Values
Constructor Detail

TestHelper

public TestHelper()
Method Detail

getTestWorkdir

public static File getTestWorkdir()

getTestBasedir

public static File getTestBasedir(Class<?> testClass)
                           throws IOException
Throws:
IOException

initTopiaContext

public static org.nuiton.topia.TopiaContext initTopiaContext(File testDirectory,
                                                             String dbname)
                                                      throws IOException,
                                                             org.nuiton.topia.TopiaNotFoundException
Throws:
IOException
org.nuiton.topia.TopiaNotFoundException

initTopiaContext

public static org.nuiton.topia.TopiaContext initTopiaContext(File testDirectory,
                                                             String dbPropertiesPath,
                                                             String dbname)
                                                      throws IOException,
                                                             org.nuiton.topia.TopiaNotFoundException
Throws:
IOException
org.nuiton.topia.TopiaNotFoundException

initTopiaContextConfiguration

public static Properties initTopiaContextConfiguration(File testDirectory,
                                                       String dbPropertiesPath,
                                                       String dbname)
                                                throws IOException
Throws:
IOException

loadHibernateConfiguration

public static Properties loadHibernateConfiguration(String dbPropertiesPath)
                                             throws IOException
Throws:
IOException

getDbName

public static String getDbName(File testDirectory,
                               String dbname)

initTopiaContextConfiguration

public static Properties initTopiaContextConfiguration(File testDirectory,
                                                       String dbname)
                                                throws IOException
Throws:
IOException


Copyright © 2004-2012 CodeLutin. All Rights Reserved.