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.ExternalResource
A
TestRule implementing ExternalResource automatically creating and destroying a new Zats Client instance.
Used with Rule this will provide a pluggable alternative to separate methods annotated with Before and After-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidafter()protected voidbefore()convenience method to load a zul page directly (calls:Client.connect(String))allows access to the automatically created ZatsClientinstance.Methods inherited from class org.junit.rules.ExternalResource
apply
-
Constructor Details
-
AutoClient
-
-
Method Details
-
before
- Overrides:
beforein classorg.junit.rules.ExternalResource- Throws:
Throwable
-
after
protected void after()- Overrides:
afterin classorg.junit.rules.ExternalResource
-
connect
convenience method to load a zul page directly (calls:Client.connect(String))- Parameters:
zulPath-- Returns:
DesktopAgent
-
getClient
allows access to the automatically created ZatsClientinstance. To access all functionality.- Returns:
- the current Zats
Client
-