public abstract class AbstractMockTestRunner<T extends TestRunnable> extends Object implements TestRunner
TestRunner.Status
Constructor and Description |
---|
AbstractMockTestRunner(T modelItem,
org.apache.log4j.Logger logger) |
Modifier and Type | Method and Description |
---|---|
void |
cancel(String reason)
Cancels an ongoing test run with the specified reason
|
void |
fail(String reason)
Fails an ongoing test run with the specified reason
|
org.apache.log4j.Logger |
getLog() |
String |
getReason()
Gets the reason why a running test was canceled or failed.
|
TestRunContext |
getRunContext() |
long |
getStartTime()
Returns the time this runner was last started
|
TestRunner.Status |
getStatus()
Gets the current status of this TestRunner
|
T |
getTestRunnable() |
long |
getTimeTaken()
Returns the time taken by this runner since its last start
|
boolean |
isRunning() |
void |
setRunContext(TestRunContext context) |
void |
start(boolean async)
Starts running this TestRunners TestCase.
|
TestRunner.Status |
waitUntilFinished()
Blocks until this runner is finished, (returns directly if it already has
finished)
|
public AbstractMockTestRunner(T modelItem, org.apache.log4j.Logger logger)
public boolean isRunning()
isRunning
in interface TestRunner
public void setRunContext(TestRunContext context)
public TestRunContext getRunContext()
getRunContext
in interface TestRunner
public org.apache.log4j.Logger getLog()
public T getTestRunnable()
getTestRunnable
in interface TestRunner
public TestRunner.Status getStatus()
TestRunner
getStatus
in interface TestRunner
public void start(boolean async)
TestRunner
start
in interface TestRunner
async
- flag controlling if TestCase should be run in seperate or
callers thread.public long getTimeTaken()
TestRunner
getTimeTaken
in interface TestRunner
public TestRunner.Status waitUntilFinished()
TestRunner
waitUntilFinished
in interface TestRunner
public void cancel(String reason)
TestRunner
cancel
in interface TestRunner
public void fail(String reason)
TestRunner
fail
in interface TestRunner
public long getStartTime()
TestRunner
getStartTime
in interface TestRunner
public String getReason()
TestRunner
getReason
in interface TestRunner
Copyright © 2019. All Rights Reserved.