Package org.zkoss.zats.mimic
Class DefaultZatsEnvironment
java.lang.Object
org.zkoss.zats.mimic.DefaultZatsEnvironment
- All Implemented Interfaces:
ZatsEnvironment
A default implementation of
ZatsEnvironment- Author:
- Hawk, Dennis
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a zats context, it uses built-in config file(web.xml, zk.xml) to init the context quickly and safely.DefaultZatsEnvironment(String webInfPathOrUrl) Create a zats Environment.DefaultZatsEnvironment(String webInfPathOrUrl, String contextPath) Create a zats Environment. -
Method Summary
-
Constructor Details
-
DefaultZatsEnvironment
public DefaultZatsEnvironment()Create a zats context, it uses built-in config file(web.xml, zk.xml) to init the context quickly and safely. -
DefaultZatsEnvironment
Create a zats Environment.
The webInfPathOrUrl is the folder of the WEB-INF to start the zats environment.- Parameters:
webInfPathOrUrl- the folder of WEB-INF, a null value means use built-in WEB-INF folder.
-
DefaultZatsEnvironment
Create a zats Environment.
The webInfPathOrUrl is the folder of the WEB-INF to start the zats environment, for example "./src/test/resources/web/WEB-INF".
The contextPath is the path of the application context, for example "/" or "/myapp".- Parameters:
webInfPathOrUrl- the folder of WEB-INF, a null value means suing built-in WEB-INF folder.contextPath- the name of the application, a null value means using "/"
-
-
Method Details
-
init
Description copied from interface:ZatsEnvironmentinitialize testing environment- Specified by:
initin interfaceZatsEnvironment- Parameters:
resourceRoot- the resource root folder of the zul, it is usually the web content folder.
-
destroy
public void destroy()Description copied from interface:ZatsEnvironmentdestroy this environment to release the resource.- Specified by:
destroyin interfaceZatsEnvironment
-
newClient
create a client.- Specified by:
newClientin interfaceZatsEnvironment- Returns:
- a new client
-
cleanup
public void cleanup()close all clients and release resources.- Specified by:
cleanupin interfaceZatsEnvironment
-