Jetif v1.8.0

jetif
Class MethodResult

java.lang.Object
  extended byjetif.MethodResult
All Implemented Interfaces:
Serializable

public class MethodResult
extends Object
implements Serializable

The MethodResult class represents a result object of a test method. It consists of expected result specified in spec and actual result returned by the test method.

Author:
Vicky Wang
See Also:
Serialized Form

Field Summary
static int ACTUAL
          Field number for get and set indicating the actual return value.
static int ACTUAL_EXCEPTION
          Field number for get and set indicating the actual exception;
static int ELAPSED_TIME
          Field number for get and set indicating the elapsed time.
static int ERROR
          Field number for get and set indicating the error.
static int EXPECTED
          Field number for get and set indicating the expected return value.
static int EXPECTED_EXCEPTION
          Field number for get and set indicating the expected exception.
static int PARAMETERS
          Field number for get and set indicating the parameters.
 
Method Summary
 String getActual()
          Returns actual result of this test method.
 String getActualException()
          Returns actual exception of this test method.
 long getElapsedTime()
          Returns elapsed time of this test method.
 String getError()
          Returns unexpected error of this test method.
 String getExpected()
          Returns expected result of this test method.
 String getExpectedException()
          Returns expected exception of this test method.
 String getName()
          Returns the name of this test method.
 String[] getParameters()
          Returns a string array represents the parameters of this test method.
 String getSignature()
          Returns the signature of this test method.
 MethodSpec getSpec()
          Returns the spec of this test method.
 boolean isSet(int field)
          Test if the specified field is set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAMETERS

public static final int PARAMETERS
Field number for get and set indicating the parameters.

See Also:
Constant Field Values

EXPECTED

public static final int EXPECTED
Field number for get and set indicating the expected return value.

See Also:
Constant Field Values

ACTUAL

public static final int ACTUAL
Field number for get and set indicating the actual return value.

See Also:
Constant Field Values

EXPECTED_EXCEPTION

public static final int EXPECTED_EXCEPTION
Field number for get and set indicating the expected exception.

See Also:
Constant Field Values

ACTUAL_EXCEPTION

public static final int ACTUAL_EXCEPTION
Field number for get and set indicating the actual exception;

See Also:
Constant Field Values

ERROR

public static final int ERROR
Field number for get and set indicating the error.

See Also:
Constant Field Values

ELAPSED_TIME

public static final int ELAPSED_TIME
Field number for get and set indicating the elapsed time.

See Also:
Constant Field Values
Method Detail

getName

public String getName()
Returns the name of this test method.

Returns:
the method name.

getSignature

public String getSignature()
Returns the signature of this test method.

Returns:
the full method signature for display.

getParameters

public String[] getParameters()
Returns a string array represents the parameters of this test method.

Returns:
the parameters array.

getExpected

public String getExpected()
Returns expected result of this test method.

Returns:
the expected result.

getExpectedException

public String getExpectedException()
Returns expected exception of this test method.

Returns:
the expected exception.

getActual

public String getActual()
Returns actual result of this test method.

Returns:
string representation of the actual result.

getActualException

public String getActualException()
Returns actual exception of this test method.

Returns:
actual exception message

getError

public String getError()
Returns unexpected error of this test method.

Returns:
error message

getElapsedTime

public long getElapsedTime()
Returns elapsed time of this test method.

Returns:
the elapsed time of this test method.

getSpec

public MethodSpec getSpec()
Returns the spec of this test method.

Returns:
the method spec.

isSet

public boolean isSet(int field)
Test if the specified field is set.

Parameters:
field - the field id.
Returns:
true if the field has been set.
Throws:
IndexOutOfBoundsException - if the specified field is invalid.

Jetif v1.8.0

Copyright © 2004,2005 Vicky Wang - All Rights Reserved.