com.google.testing.threadtester
Interface ThrowingRunnable
- All Known Subinterfaces:
- MainRunnable<T>, SecondaryRunnable<T,M>
- All Known Implementing Classes:
- MainRunnableImpl, SecondaryRunnableImpl
public interface ThrowingRunnable
A variant of Runnable whose main execution method is declared to throw an
Exception. Allows a test to throw an arbitrary Exception without having to
catch it and wrap it in a runtime exception.
- Author:
- alasdair.mackintosh@gmail.com (Alasdair Mackintosh)
- See Also:
TestThread
|
Method Summary |
void |
run()
Executes the main task of this ThrowingRunnable. |
run
void run()
throws Exception
- Executes the main task of this ThrowingRunnable. Unlike
Runnable.run(),
this method can throw an Exception. Any thrown exception will indicate a
test failure.
- Throws:
Exception
Copyright © 2013. All Rights Reserved.