ch.tatool.app
Class TestApp

java.lang.Object
  extended by ch.tatool.app.TestApp

public class TestApp
extends Object

Test Tatool Application class. Use this class to instantiate a complete tatool test instance without actually triggering the display of the UI.


Field Summary
protected  String dataDirName
          Holds the directory name that will contain created data.
 
Constructor Summary
TestApp()
           
 
Method Summary
protected  UserAccount createAccount()
          Creates and initializes a user account.
protected  Map<String,String> createAccountProperties()
          Get the Account properties to use for account creation.
protected  Map<String,byte[]> createBinaryModuleProperties()
          Create binary module properties.
protected  Module createModule(UserAccount account)
          Creates an empty persisted module instance.
protected  Map<String,DataExporter> createModuleExporters()
          Create module exporters.
protected  Map<String,String> createModuleProperties()
          Create module properties used for module creation.
 void deleteData()
          Clears the data created by the test application, that is, all user accounts created by it
 org.springframework.context.ApplicationContext getCtx()
           
 DataExportService getDataExportService()
           
 DataService getDataService()
           
 ExecutionService getExecutionService()
           
 ModuleService getModuleService()
           
 UserAccountService getUserAccountService()
           
 void runModule()
          Call this method to run the module
 void startApplication()
          Creates all services and a default test account
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dataDirName

protected String dataDirName
Holds the directory name that will contain created data.

Constructor Detail

TestApp

public TestApp()
Method Detail

startApplication

public void startApplication()
Creates all services and a default test account


deleteData

public void deleteData()
Clears the data created by the test application, that is, all user accounts created by it


runModule

public void runModule()
Call this method to run the module


createAccount

protected UserAccount createAccount()
Creates and initializes a user account.

Returns:
a newly created user account

createAccountProperties

protected Map<String,String> createAccountProperties()
Get the Account properties to use for account creation.


createModule

protected Module createModule(UserAccount account)
Creates an empty persisted module instance.


createModuleProperties

protected Map<String,String> createModuleProperties()
Create module properties used for module creation. The default implementation only sets the module name.


createBinaryModuleProperties

protected Map<String,byte[]> createBinaryModuleProperties()
Create binary module properties. The default implementation returns an empty map.


createModuleExporters

protected Map<String,DataExporter> createModuleExporters()
Create module exporters. The default implementation returns an empty list.


getCtx

public org.springframework.context.ApplicationContext getCtx()

getModuleService

public ModuleService getModuleService()

getUserAccountService

public UserAccountService getUserAccountService()

getExecutionService

public ExecutionService getExecutionService()

getDataService

public DataService getDataService()

getDataExportService

public DataExportService getDataExportService()


Copyright © 2012. All Rights Reserved.