public class AutoEnvironment
extends org.junit.rules.ExternalResource
TestRule
implementing ExternalResource
creating and destroying a ZatsEnvironment
.
Used with ClassRule
it provides a pluggable alternative to separate static methods annotated with BeforeClass
and AfterClass
Also see: dzone.com/articles/junit-49-class-and-suite-level-rulesConstructor and Description |
---|
AutoEnvironment(java.lang.String resourceRoot)
Creates a default
DefaultZatsEnvironment.DefaultZatsEnvironment() |
AutoEnvironment(java.lang.String webInfPath,
java.lang.String resourceRoot)
Creates a
DefaultZatsEnvironment.DefaultZatsEnvironment() with a specified WEB-INF folder |
Modifier and Type | Method and Description |
---|---|
protected void |
after() |
AutoClient |
autoClient()
creates an
AutoClient rule from the current AutoEnvironment |
protected void |
before() |
ZatsEnvironment |
getZatsEnvironment() |
public AutoEnvironment(java.lang.String resourceRoot)
DefaultZatsEnvironment.DefaultZatsEnvironment()
resourceRoot
- - will be passed to ZatsEnvironment.init(String)
public AutoEnvironment(java.lang.String webInfPath, java.lang.String resourceRoot)
DefaultZatsEnvironment.DefaultZatsEnvironment()
with a specified WEB-INF folderwebInfPath
- - will be used as the constructor argument in DefaultZatsEnvironment.DefaultZatsEnvironment(String)
resourceRoot
- - will be passed to ZatsEnvironment.init(String)
protected void before() throws java.lang.Throwable
before
in class org.junit.rules.ExternalResource
java.lang.Throwable
protected void after()
after
in class org.junit.rules.ExternalResource
public AutoClient autoClient()
AutoClient
rule from the current AutoEnvironment
AutoClient
rulepublic ZatsEnvironment getZatsEnvironment()
Copyright © 2019 Potix Corporation. All rights reserved.