MockClassControl (EasyMock class extension 2.5 API)
Date: 2009-12-15

Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.easymock.classextension
Class MockClassControl<T>

    java.lang.Object
      org.easymock.MockControl<T>
          org.easymock.classextension.MockClassControl<T>

All Implemented Interfaces:
  java.io.Serializable

Deprecated. Use org.easymock.classextension.EasyMock instead

    @Deprecated
    public class MockClassControl<T>

extends org.easymock.MockControl<T>

Instances of `MockClassControl` control the behavior of their associated mock objects. For more information, see the EasyMock documentation.

See Also:
  EasyMock, Serialized Form

Field Summary

Fields inherited from class org.easymock.MockControl
`ALWAYS_MATCHER, ARRAY_MATCHER, EQUALS_MATCHER, ONE, ONE_OR_MORE, ZERO_OR_MORE`

Method Summary
`static
`<T> org.easymock.MockControl<T>`
` | `createControl(java.lang.Class<T> classToMock)` Deprecated. Creates a mock control object for the specified class or interface.
`static
`<T> MockClassControl<T>`
` | `createControl(java.lang.Class<T> classToMock, java.lang.Class<?>[] constructorTypes, java.lang.Object[] constructorArgs)` Deprecated. No need to pick a constructor anymore. Constructor arguments are now ignored. Just use `createControl(Class)`
`static
`<T> MockClassControl<T>`
` | `createControl(java.lang.Class<T> classToMock, java.lang.Class<?>[] constructorTypes, java.lang.Object[] constructorArgs, java.lang.reflect.Method[] mockedMethods)` Deprecated. No need to pick a constructor anymore. Constructor arguments are now ignored. Just use `createControl(Class, Method[])`
`static
`<T> MockClassControl<T>`
` | `createControl(java.lang.Class<T> classToMock, java.lang.reflect.Method... mockedMethods)` Deprecated. Same as `createControl(Class)`but allows to pass a list of methods to mock.
`static
`<T> org.easymock.MockControl<T>`
` | `createNiceControl(java.lang.Class<T> classToMock)` Deprecated. Creates a mock control object for the specified class or interface.
`static
`<T> MockClassControl<T>`
` | `createNiceControl(java.lang.Class<T> classToMock, java.lang.Class<?>[] constructorTypes, java.lang.Object[] constructorArgs)` Deprecated. No need to pick a constructor anymore. Constructor arguments are now ignored. Just use `createNiceControl(Class)`
`static
`<T> MockClassControl<T>`
` | `createNiceControl(java.lang.Class<T> classToMock, java.lang.Class<?>[] constructorTypes, java.lang.Object[] constructorArgs, java.lang.reflect.Method... mockedMethods)` Deprecated. No need to pick a constructor anymore. Constructor arguments are now ignored. Just use `createNiceControl(Class, Method[])`
`static
`<T> MockClassControl<T>`
` | `createNiceControl(java.lang.Class<T> classToMock, java.lang.reflect.Method... mockedMethods)` Deprecated. Same as `createNiceControl(Class, Method[])`but allows to pass a list of methods to mock.
`static
`<T> org.easymock.MockControl<T>`
` | `createStrictControl(java.lang.Class<T> classToMock)` Deprecated. Creates a mock control object for the specified class or interface.
`static
`<T> MockClassControl<T>`
` | `createStrictControl(java.lang.Class<T> classToMock, java.lang.Class<?>[] constructorTypes, java.lang.Object[] constructorArgs)` Deprecated. No need to pick a constructor anymore. Constructor arguments are now ignored. Just use `createStrictControl(Class)`
`static
`<T> MockClassControl<T>`
` | `createStrictControl(java.lang.Class<T> classToMock, java.lang.Class<?>[] constructorTypes, java.lang.Object[] constructorArgs, java.lang.reflect.Method... mockedMethods)` Deprecated. No need to pick a constructor anymore. Constructor arguments are now ignored. Just use `createStrictControl(Class, Method[])`
`static
`<T> MockClassControl<T>`
` | `createStrictControl(java.lang.Class<T> classToMock, java.lang.reflect.Method... mockedMethods)` Deprecated. Same as `createStrictControl(Class)`but allows to pass a list of methods to mock.

Methods inherited from class org.easymock.MockControl
`expectAndDefaultReturn, expectAndDefaultThrow, expectAndReturn, expectAndReturn, expectAndReturn, expectAndReturn, expectAndReturn, expectAndReturn, expectAndReturn, expectAndReturn, expectAndThrow, expectAndThrow, expectAndThrow, expectAndThrow, getMock, replay, reset, setDefaultMatcher, setDefaultReturnValue, setDefaultThrowable, setDefaultVoidCallable, setMatcher, setReturnValue, setReturnValue, setReturnValue, setReturnValue, setThrowable, setThrowable, setThrowable, setThrowable, setVoidCallable, setVoidCallable, setVoidCallable, setVoidCallable, verify`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### createControl

    public static <T> org.easymock.MockControl<T> createControl(java.lang.Class<T> classToMock)

  Deprecated.
  Creates a mock control object for the specified class or interface. The `MockClassControl`and its associated mock object will not check the order of expected method calls. An unexpected method call on the mock object will lead to an `AssertionFailedError`.

  Parameters:
    `classToMock` - the class to mock.
  Returns:
    the mock control (which is a `MockClassControl`instance)

### createControl

    public static <T> MockClassControl<T> createControl(java.lang.Class<T> classToMock,
                                                        java.lang.reflect.Method... mockedMethods)

  Deprecated.
  Same as `createControl(Class)`but allows to pass a list of methods to mock. All the other methods won't be. It means that if these methods are called, their real code will be executed.

  Parameters:
    `classToMock` - the class to mock
    `mockedMethods` - Methods to be mocked. If null, all methods will be mocked.
  Returns:
    the mock control

### createStrictControl

    public static <T> org.easymock.MockControl<T> createStrictControl(java.lang.Class<T> classToMock)

  Deprecated.
  Creates a mock control object for the specified class or interface. The `MockClassControl`and its associated mock object will check the order of expected method calls. An unexpected method call on the mock object will lead to an `AssertionFailedError`.

  Parameters:
    `classToMock` - the class to mock.
  Returns:
    the mock control (which is a `MockClassControl`instance)

### createStrictControl

    public static <T> MockClassControl<T> createStrictControl(java.lang.Class<T> classToMock,
                                                              java.lang.reflect.Method... mockedMethods)

  Deprecated.
  Same as `createStrictControl(Class)`but allows to pass a list of methods to mock. All the other methods won't be. It means that if these methods are called, their real code will be executed.

  Parameters:
    `classToMock` - the class to mock
    `mockedMethods` - Methods to be mocked. If null, all methods will be mocked.
  Returns:
    the mock control

### createNiceControl

    public static <T> org.easymock.MockControl<T> createNiceControl(java.lang.Class<T> classToMock)

  Deprecated.
  Creates a mock control object for the specified class or interface. The `MockClassControl`and its associated mock object will check not the order of expected method calls. An unexpected method call on the mock object will return an empty value (0, null, false).

  Parameters:
    `classToMock` - the class to mock.
  Returns:
    the mock control (which is a `MockClassControl`instance)

### createNiceControl

    public static <T> MockClassControl<T> createNiceControl(java.lang.Class<T> classToMock,
                                                            java.lang.reflect.Method... mockedMethods)

  Deprecated.
  Same as `createNiceControl(Class, Method[])`but allows to pass a list of methods to mock. All the other methods won't be. It means that if these methods are called, their real code will be executed.

  Parameters:
    `classToMock` - the class to mock
    `mockedMethods` - Methods to be mocked. If null, all methods will be mocked.
  Returns:
    the mock control

### createControl

    @Deprecated
    public static <T> MockClassControl<T> createControl(java.lang.Class<T> classToMock,
                                                                   java.lang.Class<?>[] constructorTypes,
                                                                   java.lang.Object[] constructorArgs)

  Deprecated. No need to pick a constructor anymore. Constructor arguments are now ignored. Just use `createControl(Class)`

### createControl

    @Deprecated
    public static <T> MockClassControl<T> createControl(java.lang.Class<T> classToMock,
                                                                   java.lang.Class<?>[] constructorTypes,
                                                                   java.lang.Object[] constructorArgs,
                                                                   java.lang.reflect.Method[] mockedMethods)

  Deprecated. No need to pick a constructor anymore. Constructor arguments are now ignored. Just use `createControl(Class, Method[])`

### createStrictControl

    @Deprecated
    public static <T> MockClassControl<T> createStrictControl(java.lang.Class<T> classToMock,
                                                                         java.lang.Class<?>[] constructorTypes,
                                                                         java.lang.Object[] constructorArgs)

  Deprecated. No need to pick a constructor anymore. Constructor arguments are now ignored. Just use `createStrictControl(Class)`

### createStrictControl

    @Deprecated
    public static <T> MockClassControl<T> createStrictControl(java.lang.Class<T> classToMock,
                                                                         java.lang.Class<?>[] constructorTypes,
                                                                         java.lang.Object[] constructorArgs,
                                                                         java.lang.reflect.Method... mockedMethods)

  Deprecated. No need to pick a constructor anymore. Constructor arguments are now ignored. Just use `createStrictControl(Class, Method[])`

### createNiceControl

    @Deprecated
    public static <T> MockClassControl<T> createNiceControl(java.lang.Class<T> classToMock,
                                                                       java.lang.Class<?>[] constructorTypes,
                                                                       java.lang.Object[] constructorArgs)

  Deprecated. No need to pick a constructor anymore. Constructor arguments are now ignored. Just use `createNiceControl(Class)`

### createNiceControl

    @Deprecated
    public static <T> MockClassControl<T> createNiceControl(java.lang.Class<T> classToMock,
                                                                       java.lang.Class<?>[] constructorTypes,
                                                                       java.lang.Object[] constructorArgs,
                                                                       java.lang.reflect.Method... mockedMethods)

  Deprecated. No need to pick a constructor anymore. Constructor arguments are now ignored. Just use `createNiceControl(Class, Method[])`

Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2009 OFFIS, Henri Tremblay. This documentation is provided under the terms of the MIT licence.