com.atlassian.crowd.acceptance.tests
Class TestDataState
java.lang.Object
com.atlassian.crowd.acceptance.tests.TestDataState
public class TestDataState
- extends Object
A singleton to keep track of the state of a test data. This can
prevent unnecessary restore. All methods are keyed by the
baseUrl
so parallel instances of Crowd can be
tracked during a single test run.
Method Summary |
void |
intendToModify(URL baseUrl)
Indicate that a test intends to modify the data in Crowd. |
boolean |
isRestoredXml(URL baseUrl,
String xmlfilename)
Report on whether an unmodified version of the data in
xmlfilename is available. |
void |
setRestoredXml(URL baseUrl,
String xmlfilename)
Declare that the data in xmlfilename has been restored. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final TestDataState INSTANCE
TestDataState
public TestDataState()
isRestoredXml
public boolean isRestoredXml(URL baseUrl,
String xmlfilename)
- Report on whether an unmodified version of the data in
xmlfilename
is available.
- Returns:
true
if a test can rely on Crowd's state being from
xmlfilename
setRestoredXml
public void setRestoredXml(URL baseUrl,
String xmlfilename)
- Declare that the data in
xmlfilename
has been restored.
intendToModify
public void intendToModify(URL baseUrl)
- Indicate that a test intends to modify the data in Crowd. After this
isRestoredXml(URL, String)
will report false
until
another restore.
Copyright © 2013 Atlassian. All Rights Reserved.