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 Details

  • Method Details

    • before

      protected void before() throws Throwable
      Overrides:
      before in class org.junit.rules.ExternalResource
      Throws:
      Throwable
    • after

      protected void after()
      Overrides:
      after in class org.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
    • getClient

      public Client getClient()
      allows access to the automatically created Zats Client instance. To access all functionality.
      Returns:
      the current Zats Client