com.google.testing.threadtester
Class RunResult

java.lang.Object
  extended by com.google.testing.threadtester.RunResult

public class RunResult
extends Object

Represents the result of running an InterleavedRunner.

Author:
alasdair.mackintosh@gmail.com (Alasdair Mackintosh)

Constructor Summary
RunResult()
           
RunResult(Throwable main, Throwable secondary)
           
 
Method Summary
 Throwable getMainException()
          Gets the exception thrown by the MainRunnable
 Throwable getSecondaryException()
          Gets the exception thrown by the SecondaryRunnable
 boolean hadException()
           
 void throwExceptionsIfAny()
          Throws the main and/or secondary exceptions if they are non-null.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RunResult

public RunResult()

RunResult

public RunResult(Throwable main,
                 Throwable secondary)
Method Detail

hadException

public boolean hadException()

throwExceptionsIfAny

public void throwExceptionsIfAny()
                          throws RuntimeException
Throws the main and/or secondary exceptions if they are non-null. If both exceptions are null, does nothing. The exceptions are wrapped in a RuntimeException.

Throws:
RuntimeException

getMainException

public Throwable getMainException()
Gets the exception thrown by the MainRunnable


getSecondaryException

public Throwable getSecondaryException()
Gets the exception thrown by the SecondaryRunnable


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.