net.grinder.testutility
Class CallData

java.lang.Object
  extended by junit.framework.Assert
      extended by net.grinder.testutility.CallData
All Implemented Interfaces:
CallAssertions

public final class CallData
extends junit.framework.Assert
implements CallAssertions

Method call data.

Author:
Philip Aston

Nested Class Summary
static class CallData.ANY_TYPE
          Class that represents a parameter that is compatible with any type.
 
Constructor Summary
CallData(Method method, Object result, Object... parameters)
           
CallData(Method method, Throwable throwable, Object... parameters)
           
 
Method Summary
 CallData assertException(String methodName, Class<?> throwableType, Class<?>... parameterTypes)
           
 CallData assertException(String methodName, Class<?> throwableType, Object... parameters)
          Check the given method was called, and that it threw an exception of the given type.
 CallData assertException(String methodName, Throwable throwable, Class<?>... parameterTypes)
           
 CallData assertException(String methodName, Throwable throwable, Object... parameters)
          Check the given method was called, and that it threw the given exception.
 CallData assertSuccess(String methodName)
           
 CallData assertSuccess(String methodName, Class<?>... parameterTypes)
           
 CallData assertSuccess(String methodName, Object... parameters)
          Check the given method was called.
 Method getMethod()
           
 String getMethodName()
           
 Object[] getParameters()
           
 Class<?>[] getParameterTypes()
           
 Object getResult()
           
 Throwable getThrowable()
           
 String toString()
           
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CallData

public CallData(Method method,
                Object result,
                Object... parameters)

CallData

public CallData(Method method,
                Throwable throwable,
                Object... parameters)
Method Detail

getMethod

public Method getMethod()

getMethodName

public String getMethodName()

getParameters

public Object[] getParameters()

getParameterTypes

public Class<?>[] getParameterTypes()

getResult

public Object getResult()

getThrowable

public Throwable getThrowable()

assertSuccess

public final CallData assertSuccess(String methodName,
                                    Object... parameters)
Check the given method was called.

Specified by:
assertSuccess in interface CallAssertions

assertSuccess

public final CallData assertSuccess(String methodName,
                                    Class<?>... parameterTypes)
Specified by:
assertSuccess in interface CallAssertions

assertSuccess

public final CallData assertSuccess(String methodName)

assertException

public final CallData assertException(String methodName,
                                      Throwable throwable,
                                      Object... parameters)
Description copied from interface: CallAssertions
Check the given method was called, and that it threw the given exception.

Specified by:
assertException in interface CallAssertions

assertException

public final CallData assertException(String methodName,
                                      Throwable throwable,
                                      Class<?>... parameterTypes)
Specified by:
assertException in interface CallAssertions

assertException

public final CallData assertException(String methodName,
                                      Class<?> throwableType,
                                      Object... parameters)
Description copied from interface: CallAssertions
Check the given method was called, and that it threw an exception of the given type.

Specified by:
assertException in interface CallAssertions

assertException

public final CallData assertException(String methodName,
                                      Class<?> throwableType,
                                      Class<?>... parameterTypes)
Specified by:
assertException in interface CallAssertions

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2000-2012. All Rights Reserved.