org.jboss.arquillian.test.spi
Class TestResult

java.lang.Object
  extended by org.jboss.arquillian.test.spi.TestResult
All Implemented Interfaces:
Serializable

public final class TestResult
extends Object
implements Serializable

A test result which may be serialized for communicate between client and server

Author:
Pete Muir, Aslak Knutsen
See Also:
Serialized Form

Nested Class Summary
static class TestResult.Status
          The test status
 
Constructor Summary
TestResult()
          Create a empty result.

Start time is set to Current Milliseconds.
TestResult(TestResult.Status status)
          Create a new TestResult.

Start time is set to Current Milliseconds.
TestResult(TestResult.Status status, Throwable throwable)
          Create a new TestResult.

Start time is set to Current Milliseconds.
 
Method Summary
 long getEnd()
          Get the end time.
 ExceptionProxy getExceptionProxy()
           
 long getStart()
          Get the start time.
 TestResult.Status getStatus()
          Get the status of this test
 Throwable getThrowable()
          If the test failed, the exception that was thrown.
 void setEnd(long end)
          Set the end time of the test.
 void setStart(long start)
          Set the start time of the test.
 void setStatus(TestResult.Status status)
           
 void setThrowable(Throwable throwable)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestResult

public TestResult()
Create a empty result.

Start time is set to Current Milliseconds.


TestResult

public TestResult(TestResult.Status status)
Create a new TestResult.

Start time is set to Current Milliseconds.

Parameters:
status - The result status.

TestResult

public TestResult(TestResult.Status status,
                  Throwable throwable)
Create a new TestResult.

Start time is set to Current Milliseconds.

Parameters:
status - The result status.
throwable - thrown exception if any
Method Detail

getStatus

public TestResult.Status getStatus()
Get the status of this test


setStatus

public void setStatus(TestResult.Status status)

getThrowable

public Throwable getThrowable()
If the test failed, the exception that was thrown. It does not need to be the root cause.


setThrowable

public void setThrowable(Throwable throwable)

setStart

public void setStart(long start)
Set the start time of the test.

Parameters:
start - Start time in milliseconds

getStart

public long getStart()
Get the start time.

Returns:
Start time in milliseconds

setEnd

public void setEnd(long end)
Set the end time of the test.

Parameters:
End - time in milliseconds

getEnd

public long getEnd()
Get the end time.

Returns:
End time in milliseconds

getExceptionProxy

public ExceptionProxy getExceptionProxy()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.