public final class WindGateTestHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ENV_FRAMEWORK_HOME
The environment variable name / parameter name in profile context for the framework home path.
|
static String |
PRODUCTION_PLUGIN_DIRECTORY
WindGate plugin directory path from Asakusa installation path.
|
static String |
PRODUCTION_PROFILE_PATH
For normal use, WindGate profile path pattern in form of
MessageFormat. |
static String |
TESTING_PROFILE_PATH
For testing, WindGate profile path pattern in form of
MessageFormat. |
| Modifier and Type | Method and Description |
|---|---|
static <T> ProcessScript<T> |
createProcessScript(Class<T> modelType,
WindGateExporterDescription description)
Creates a new
ProcessScript for testing. |
static <T> ProcessScript<T> |
createProcessScript(Class<T> modelType,
WindGateImporterDescription description)
Creates a new
ProcessScript for testing. |
static ProfileContext |
createProfileContext(TestContext testContext)
Creates a WindGate
ProfileContext for the test context. |
static ResourceManipulator |
createResourceManipulator(TestContext testContext,
WindGateProcessDescription description,
ParameterList arguments)
Creates a
ResourceMirror for the description. |
static void |
disposePluginClassLoader(PluginClassLoader loader)
Disposes WindGate plug-in class loader.
|
static <T extends Preparable & Closeable> |
prepare(T object)
Invoke
object.prepare(), or Closeable.close() is failed. |
public static final String ENV_FRAMEWORK_HOME
public static final String TESTING_PROFILE_PATH
MessageFormat.
{0} will be replaced as the its profile name.
This module will load these files from the class path.public static final String PRODUCTION_PLUGIN_DIRECTORY
public static final String PRODUCTION_PROFILE_PATH
MessageFormat.
{0} will be replaced as the its profile name.
This module will load these files in ASAKUSA_HOME
if there are not in TESTING_PROFILE_PATH.ENV_FRAMEWORK_HOME,
Constant Field Valuespublic static <T> ProcessScript<T> createProcessScript(Class<T> modelType, WindGateImporterDescription description)
ProcessScript for testing.
The description is used for a source driver, and a dummy driver is set as its drain.T - the type of target data modelmodelType - the type of target data modeldescription - target descriptionIllegalArgumentException - if some parameters were nullpublic static <T> ProcessScript<T> createProcessScript(Class<T> modelType, WindGateExporterDescription description)
ProcessScript for testing.
The description is used for a drain driver, and a dummy driver is set as its source.T - the type of target data modelmodelType - the type of target data modeldescription - target descriptionIllegalArgumentException - if some parameters were nullpublic static ProfileContext createProfileContext(TestContext testContext)
ProfileContext for the test context.testContext - the current test contextProfileContextpublic static ResourceManipulator createResourceManipulator(TestContext testContext, WindGateProcessDescription description, ParameterList arguments) throws IOException
ResourceMirror for the description.testContext - current testing contextdescription - the target descriptionarguments - the argumentsResourceManipulatorIOException - if failed to create a manipulatorIllegalArgumentException - if some parameters were nullpublic static <T extends Preparable & Closeable> T prepare(T object) throws IOException
object.prepare(), or Closeable.close() is failed.T - the target object typeobject - target objectIOException - if failed to prepare the objectIllegalArgumentException - if some parameters were nullpublic static void disposePluginClassLoader(PluginClassLoader loader)
loader - the target plug-in class loaderCopyright © 2011–2018 Asakusa Framework Team. All rights reserved.