Package org.zkoss.zats.junit
Class AutoClient
- java.lang.Object
-
- org.junit.rules.ExternalResource
-
- org.zkoss.zats.junit.AutoClient
-
- All Implemented Interfaces:
org.junit.rules.TestRule
public class AutoClient extends org.junit.rules.ExternalResourceATestRuleimplementingExternalResourceautomatically creating and destroying a new ZatsClientinstance. Used withRulethis will provide a pluggable alternative to separate methods annotated withBeforeandAfter
-
-
Constructor Summary
Constructors Constructor Description AutoClient(AutoEnvironment autoEnv)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidafter()protected voidbefore()DesktopAgentconnect(String zulPath)convenience method to load a zul page directly (calls:Client.connect(String))ClientgetClient()allows access to the automatically created ZatsClientinstance.
-
-
-
Constructor Detail
-
AutoClient
public AutoClient(AutoEnvironment autoEnv)
-
-
Method Detail
-
before
protected void before() throws Throwable- Overrides:
beforein classorg.junit.rules.ExternalResource- Throws:
Throwable
-
after
protected void after()
- Overrides:
afterin classorg.junit.rules.ExternalResource
-
connect
public DesktopAgent connect(String zulPath)
convenience method to load a zul page directly (calls:Client.connect(String))- Parameters:
zulPath-- Returns:
DesktopAgent
-
-