|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jbenchmark.TopLevelContext
Test Context, includes Features, Resources accessible by all tests etc.
Constructor Summary | |
TopLevelContext()
Default constructor |
Method Summary | |
void |
assertNoFailures()
Asserts that no tests failed. |
java.lang.String |
getAttribute(java.lang.String name)
Returns the value of a test attribute. |
ConnectionFactory |
getConnectionFactory()
|
java.io.InputStream |
getExternalResource(java.lang.String nameOfResource)
Locate an external resource that is made availble to the class loader from whichi this top level context was created from. |
java.util.List |
getFailures()
|
TestListener |
getListener()
Returns the listener to use to notify the container of test execution. |
ResultPublisher |
getPublisher()
|
java.lang.Object |
getResource(java.lang.Class resClass)
Locates a resource. |
HttpServer |
getServer()
|
StatisticPublisher |
getStatisticPublisher()
Return the publisher that should be used for publishing statistics. |
int |
getThreadCount()
There is always 1 thread in the top-level context. |
void |
setAttribute(java.lang.String name,
java.lang.String value)
Sets the value of a test attribute. |
void |
setConnectionFactory(ConnectionFactory connectionFactory)
|
void |
setPublisher(ResultPublisher publisher)
|
void |
setServer(HttpServer server)
|
void |
setStatisticPublisher(StatisticPublisher publisher)
Set the publisher that should be used for publishing statistics. |
void |
testFailed(Test test,
java.lang.Throwable throwable)
Called when a test fails. |
void |
testFinished(TestResult result)
Called when a test finishes. |
void |
testStart(Test test)
Called when a test starts. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TopLevelContext()
Method Detail |
public java.lang.Object getResource(java.lang.Class resClass) throws java.lang.Exception
getResource
in interface TestContext
java.lang.Exception
public java.io.InputStream getExternalResource(java.lang.String nameOfResource)
getExternalResource
in interface TestContext
public TestListener getListener()
getListener
in interface TestContext
public HttpServer getServer()
HttpServer
public ResultPublisher getPublisher()
ResultPublisher
public ConnectionFactory getConnectionFactory()
ConnectionFactory
public java.util.List getFailures()
public void setServer(HttpServer server)
server
- public void setPublisher(ResultPublisher publisher)
publisher
- public void setConnectionFactory(ConnectionFactory connectionFactory)
connectionFactory
- public int getThreadCount()
getThreadCount
in interface TestContext
public java.lang.String getAttribute(java.lang.String name)
getAttribute
in interface TestContext
public void setAttribute(java.lang.String name, java.lang.String value)
setAttribute
in interface TestContext
public void testStart(Test test)
testStart
in interface TestListener
public void testFailed(Test test, java.lang.Throwable throwable)
testFailed
in interface TestListener
public void testFinished(TestResult result)
testFinished
in interface TestListener
public void assertNoFailures() throws java.lang.Exception
java.lang.Exception
public StatisticPublisher getStatisticPublisher()
public void setStatisticPublisher(StatisticPublisher publisher)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |