Package org.tentackle.pdo.testng
Class TestApplication
java.lang.Object
org.tentackle.app.AbstractApplication
org.tentackle.pdo.testng.TestApplication
- All Implemented Interfaces:
Application,DomainContextProvider,org.tentackle.session.SessionProvider
Base class for TestNG tests that must run as an application.
- Author:
- harald
-
Field Summary
Fields inherited from class org.tentackle.app.AbstractApplication
DISABLE_MODIFICATION_TRACKER, DISABLE_SECURITY_MANAGER, ENABLE_STATISTICS, LOCALE, SCRIPTING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreateDatabaseTables(org.tentackle.dbms.Db db) Creates the database tables.
The default implementation loads the model from the classpath.<U extends org.tentackle.misc.Identifiable>
UgetUser(DomainContext context, long userId) protected voidPopulates the database with test data.voidprotected voidstartup()voidMethods inherited from class org.tentackle.app.AbstractApplication
activateStatistics, applyProperties, cleanup, configure, configureModificationTracker, configurePreferences, configureSecurityManager, createDomainContext, createSession, createSessionInfo, filterName, filterVersion, finishStartup, getCommandLine, getCreationTime, getDomainContext, getName, getProperties, getProperty, getPropertyAsChars, getPropertyAsCharsIgnoreCase, getPropertyIgnoreCase, getSession, getSessionInfo, getVersion, initialize, initializeScripting, isInteractive, isServer, isSystemExitNecessaryToStop, logStackdump, logStatistics, setDomainContext, setProperties, setSessionInfo, start, stop, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.tentackle.app.Application
register, start, stop, unregisterMethods inherited from interface org.tentackle.pdo.DomainContextProvider
isWithinContext, isWithinContext, on, on, op, op
-
Constructor Details
-
TestApplication
Creates a test application.- Parameters:
name- the application name, null for default nameversion- the application version, null for default version
-
-
Method Details
-
setUpClass
- Throws:
Exception
-
tearDownClass
- Throws:
Exception
-
startup
protected void startup()- Specified by:
startupin classAbstractApplication
-
getUser
-
createDatabaseTables
protected void createDatabaseTables(org.tentackle.dbms.Db db) Creates the database tables.
The default implementation loads the model from the classpath. Override this method to provide additional model sources.- Parameters:
db- the low-level database session- See Also:
-
populateDatabase
protected void populateDatabase()Populates the database with test data.
-