org.apache.pluto.testsuite
Class TestUtils

java.lang.Object
  extended by org.apache.pluto.testsuite.TestUtils

public class TestUtils
extends java.lang.Object

Static class that provides utility methods for Pluto testsuite.

Since:
2006-02-13

Method Summary
static void failOnAssertion(java.lang.String valueName, java.lang.Object valueGot, java.lang.Object valueExpected, TestResult result)
          Sets the test result return code to FAILED, and reports assertion details by specifying value got and value expected.
static void failOnAssertion(java.lang.String valuesName, java.lang.String[] valuesGot, java.lang.String[] valuesExpected, TestResult result)
          Sets the test result return code to FAILED, and reports assertion details by specifying values got and values expected.
static void failOnException(java.lang.String message, java.lang.Throwable cause, TestResult result)
          Sets the test result return code to FAILED, and reports exception details.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

failOnAssertion

public static void failOnAssertion(java.lang.String valuesName,
                                   java.lang.String[] valuesGot,
                                   java.lang.String[] valuesExpected,
                                   TestResult result)
Sets the test result return code to FAILED, and reports assertion details by specifying values got and values expected.

Parameters:
valueName - the name of the values to assert.
valueGot - the values got.
valueExpected - the values expected.
result - the test result.

failOnAssertion

public static void failOnAssertion(java.lang.String valueName,
                                   java.lang.Object valueGot,
                                   java.lang.Object valueExpected,
                                   TestResult result)
Sets the test result return code to FAILED, and reports assertion details by specifying value got and value expected.

Parameters:
valueName - the name of the value to assert.
valueGot - the value object got.
valueExpected - the value object expected.
result - the test result.

failOnException

public static void failOnException(java.lang.String message,
                                   java.lang.Throwable cause,
                                   TestResult result)
Sets the test result return code to FAILED, and reports exception details.

Parameters:
message - the error message.
cause - the cause exception.
result - the test result.


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.