|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - the type under test. It is expected that the runnable will invoke
a method on this class.public interface MainRunnable<T>
Interface passed to the InterleavedRunner that represents the main
thread of execution.
InterleavedRunner,
SecondaryRunnable| Method Summary | |
|---|---|
Class<T> |
getClassUnderTest()
Returns the class being tested by this runnable. |
T |
getMainObject()
Gets the main object being tested. |
Method |
getMethod()
Gets the method being tested by this runnable. |
String |
getMethodName()
Gets the name of the method being tested by this runnable. |
void |
initialize()
Invoked by the framework before running this runnable. |
void |
terminate()
Invoked by the framework after running this runnable. |
| Methods inherited from interface com.google.testing.threadtester.ThrowingRunnable |
|---|
run |
| Method Detail |
|---|
Class<T> getClassUnderTest()
ClassInstrumentation,
InstrumentationString getMethodName()
Runnable.run()
method. If this runnable is not testing an instrumented class, then this
method may return null. May return null if getMethod() does not.
Method getMethod()
throws NoSuchMethodException
Thread.run() method. If
this runnable is not testing an instrumented class, then this method may
return null.
May throw a NoSuchMethodException if the method cannot be found. This will
cause the InterleavedRunner to throw an IllegalArgumentException. May
return null if getMethodName() does not.
NoSuchMethodException
void initialize()
throws Exception
InterleavedRunner.interleave(M, com.google.testing.threadtester.SecondaryRunnable) .
ExceptionT getMainObject()
getMethod() on this object. This method will not be
called until initialize() has been called. Typical implementations
will create a new instance of the test object in initialize(), and
return it here.
SecondaryRunnable.initialize(M)
void terminate()
throws Exception
InterleavedRunner.interleave(M, com.google.testing.threadtester.SecondaryRunnable) .
ExceptionRunResult
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||