|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.lightest.core.TestRegistry
public class TestRegistry
The test registry is used to keep track of two things: 1) the pending tests, i.e. ones that are scheduled to run but have not yet had results reported against them; and 2) the id of each test result - which is used to cross-reference between the default generated testng-results.xml and the LightestTestResult object passed into ILightestReporter methods. All operations are thread-safe.
| Constructor Summary | |
|---|---|
TestRegistry()
|
|
TestRegistry(List tests)
|
|
TestRegistry(TestRegistry other)
|
|
| Method Summary | |
|---|---|
void |
add(List tests)
Adds a list of TestInstance's to the registry. |
void |
add(TestInstance test)
Adds a single TestInstance to the registry. |
Map |
getData()
Returns an immutable mapping of TestInstance's to their counting tickers. |
Object |
getId(ITestResult result)
Returns the Integer id this result was resolved with, or null if the result is not registered. |
groovy.lang.MetaClass |
getMetaClass()
|
Object |
getProperty(String name)
|
Set |
getUniqueClassNames()
Returns a Set of unique class names associated with all registered test instances. |
Object |
invokeMethod(String name,
Object args)
|
TestRegistry |
match(String className)
Returns a new test registry, filtered by class name. |
TestRegistry |
match(String suiteName,
String testName)
Returns a new test registry, filtered by suite name and test name. |
void |
resolve(String suiteName,
String testName,
ITestResult result,
int id)
Removes the first test instance associated with the TestNG test result, if any, and adds in a result to replace it. |
void |
resolve(TestNGContext testngContext,
ITestResult result,
int id)
|
void |
setMetaClass(groovy.lang.MetaClass metaClass)
|
void |
setProperty(String name,
Object value)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TestRegistry()
public TestRegistry(List tests)
public TestRegistry(TestRegistry other)
| Method Detail |
|---|
public void add(TestInstance test)
test - the test instance to addpublic void add(List tests)
tests - the test instances to add
public void resolve(TestNGContext testngContext,
ITestResult result,
int id)
public void resolve(String suiteName,
String testName,
ITestResult result,
int id)
suiteName - testName - result - public Map getData()
public Object getId(ITestResult result)
result - public Set getUniqueClassNames()
public TestRegistry match(String suiteName,
String testName)
suiteName - testName - public TestRegistry match(String className)
className - public String toString()
toString in class Objectpublic groovy.lang.MetaClass getMetaClass()
getMetaClass in interface groovy.lang.GroovyObjectpublic void setMetaClass(groovy.lang.MetaClass metaClass)
setMetaClass in interface groovy.lang.GroovyObject
public Object invokeMethod(String name,
Object args)
invokeMethod in interface groovy.lang.GroovyObjectpublic Object getProperty(String name)
getProperty in interface groovy.lang.GroovyObject
public void setProperty(String name,
Object value)
setProperty in interface groovy.lang.GroovyObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||