MockObjectSupportTestCase
Date: 2015-09-15

org.jmock.core

## Class MockObjectSupportTestCase

- java.lang.Object
- - junit.framework.Assert
  - - junit.framework.TestCase
    - - org.jmock.core.VerifyingTestCase
      - - org.jmock.core.MockObjectSupportTestCase

- All Implemented Interfaces:
    junit.framework.Test
  Direct Known Subclasses:
    MockObjectTestCase

      public abstract class MockObjectSupportTestCase
      extends VerifyingTestCase

  Since:
    1.0

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Constraint` | `ANYTHING`
    `static Constraint` | `NOT_NULL`
    `static Constraint` | `NULL`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MockObjectSupportTestCase()`
    `MockObjectSupportTestCase(java.lang.String name)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `And` | `and(Constraint left, Constraint right)`
    `IsArrayContaining` | `arrayContaining(boolean element)`
    `IsArrayContaining` | `arrayContaining(byte element)`
    `IsArrayContaining` | `arrayContaining(char element)`
    `IsArrayContaining` | `arrayContaining(Constraint elementConstraint)`
    `IsArrayContaining` | `arrayContaining(double element)`
    `IsArrayContaining` | `arrayContaining(float element)`
    `IsArrayContaining` | `arrayContaining(int element)`
    `IsArrayContaining` | `arrayContaining(long element)`
    `IsArrayContaining` | `arrayContaining(java.lang.Object element)`
    `IsArrayContaining` | `arrayContaining(short element)`
    `void` | `assertThat(boolean actual, Constraint constraint)`
    `void` | `assertThat(byte actual, Constraint constraint)`
    `void` | `assertThat(char actual, Constraint constraint)`
    `void` | `assertThat(double actual, Constraint constraint)`
    `void` | `assertThat(float actual, Constraint constraint)`
    `void` | `assertThat(int actual, Constraint constraint)`
    `void` | `assertThat(long actual, Constraint constraint)`
    `void` | `assertThat(java.lang.Object actual, Constraint constraint)`
    `void` | `assertThat(short actual, Constraint constraint)`
    `IsCollectionContaining` | `collectionContaining(Constraint elementConstraint)`
    `IsCollectionContaining` | `collectionContaining(java.lang.Object element)`
    `IsCompatibleType` | `compatibleType(java.lang.Class baseType)`
    `StringContains` | `contains(java.lang.String substring)`
    `StringEndsWith` | `endsWith(java.lang.String substring)`
    `IsEqual` | `eq(boolean operand)`
    `IsEqual` | `eq(byte operand)`
    `IsEqual` | `eq(char operand)`
    `IsEqual` | `eq(double operand)`
    `IsCloseTo` | `eq(double operand, double error)`
    `IsEqual` | `eq(float operand)`
    `IsEqual` | `eq(int operand)`
    `IsEqual` | `eq(long operand)`
    `IsEqual` | `eq(java.lang.Object operand)`
    `IsEqual` | `eq(short operand)`
    `HasProperty` | `hasProperty(java.lang.String propertyName)`
    `HasPropertyWithValue` | `hasProperty(java.lang.String propertyName, Constraint expectation)`
    `IsInstanceOf` | `isA(java.lang.Class operandClass)`
    `IsIn` | `isIn(java.util.Collection collection)`
    `IsIn` | `isIn(java.lang.Object[] array)`
    `IsMapContaining` | `mapContaining(Constraint keyConstraint, Constraint valueConstraint)`
    `IsMapContaining` | `mapContaining(java.lang.Object key, java.lang.Object value)`
    `IsMapContaining` | `mapWithKey(Constraint keyConstraint)`
    `IsMapContaining` | `mapWithKey(java.lang.Object key)`
    `IsMapContaining` | `mapWithValue(Constraint valueConstraint)`
    `IsMapContaining` | `mapWithValue(java.lang.Object value)`
    `java.lang.Object` | `newDummy(java.lang.Class dummyType)` Deprecated. Use MockObjectTestCase.newDummy instead
    `java.lang.Object` | `newDummy(java.lang.Class dummyType, java.lang.String name)` Deprecated. Use MockObjectTestCase.newDummy instead
    `java.lang.Object` | `newDummy(java.lang.String name)` Deprecated. Use MockObjectTestCase.newDummy instead
    `IsNot` | `not(Constraint c)`
    `Or` | `or(Constraint left, Constraint right)`
    `IsSame` | `same(java.lang.Object operand)`
    `StringStartsWith` | `startsWith(java.lang.String substring)`
    `StringContains` | `stringContains(java.lang.String substring)`
    `HasToString` | `toString(Constraint toStringConstraint)`

    - ### Methods inherited from class org.jmock.core.VerifyingTestCase

      `registerToVerify, runBare, unregisterToVerify, verify`

    - ### Methods inherited from class junit.framework.TestCase

      `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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runTest, setName, setUp, tearDown, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### ANYTHING

          public static final Constraint ANYTHING

    - #### NULL

          public static final Constraint NULL

    - #### NOT_NULL

          public static final Constraint NOT_NULL

  - ### Constructor Detail

    - #### MockObjectSupportTestCase

          public MockObjectSupportTestCase()

    - #### MockObjectSupportTestCase

          public MockObjectSupportTestCase(java.lang.String name)

  - ### Method Detail

    - #### eq

          public IsEqual eq(java.lang.Object operand)

    - #### eq

          public IsEqual eq(boolean operand)

    - #### eq

          public IsEqual eq(byte operand)

    - #### eq

          public IsEqual eq(short operand)

    - #### eq

          public IsEqual eq(char operand)

    - #### eq

          public IsEqual eq(int operand)

    - #### eq

          public IsEqual eq(long operand)

    - #### eq

          public IsEqual eq(float operand)

    - #### eq

          public IsEqual eq(double operand)

    - #### eq

          public IsCloseTo eq(double operand,
                     double error)

    - #### same

          public IsSame same(java.lang.Object operand)

    - #### isA

          public IsInstanceOf isA(java.lang.Class operandClass)

    - #### stringContains

          public StringContains stringContains(java.lang.String substring)

    - #### contains

          public StringContains contains(java.lang.String substring)

      Since:
        1.1.0

    - #### startsWith

          public StringStartsWith startsWith(java.lang.String substring)

      Since:
        1.1.0

    - #### endsWith

          public StringEndsWith endsWith(java.lang.String substring)

      Since:
        1.1.0

    - #### not

          public IsNot not(Constraint c)

    - #### and

          public And and(Constraint left,
                Constraint right)

    - #### or

          public Or or(Constraint left,
              Constraint right)

    - #### newDummy

          public java.lang.Object newDummy(java.lang.Class dummyType)

      Deprecated. Use MockObjectTestCase.newDummy instead

    - #### newDummy

          public java.lang.Object newDummy(java.lang.Class dummyType,
                                  java.lang.String name)

      Deprecated. Use MockObjectTestCase.newDummy instead

    - #### newDummy

          public java.lang.Object newDummy(java.lang.String name)

      Deprecated. Use MockObjectTestCase.newDummy instead

    - #### assertThat

          public void assertThat(java.lang.Object actual,
                        Constraint constraint)

      Since:
        1.0.1

    - #### assertThat

          public void assertThat(boolean actual,
                        Constraint constraint)

    - #### assertThat

          public void assertThat(byte actual,
                        Constraint constraint)

    - #### assertThat

          public void assertThat(short actual,
                        Constraint constraint)

    - #### assertThat

          public void assertThat(char actual,
                        Constraint constraint)

    - #### assertThat

          public void assertThat(int actual,
                        Constraint constraint)

    - #### assertThat

          public void assertThat(long actual,
                        Constraint constraint)

    - #### assertThat

          public void assertThat(float actual,
                        Constraint constraint)

    - #### assertThat

          public void assertThat(double actual,
                        Constraint constraint)

    - #### hasProperty

          public HasPropertyWithValue hasProperty(java.lang.String propertyName,
                                         Constraint expectation)

      Since:
        1.1.0

    - #### hasProperty

          public HasProperty hasProperty(java.lang.String propertyName)

      Since:
        1.1.0

    - #### toString

          public HasToString toString(Constraint toStringConstraint)

      Since:
        1.1.0

    - #### compatibleType

          public IsCompatibleType compatibleType(java.lang.Class baseType)

      Since:
        1.1.0

    - #### isIn

          public IsIn isIn(java.util.Collection collection)

      Since:
        1.1.0

    - #### isIn

          public IsIn isIn(java.lang.Object[] array)

      Since:
        1.1.0

    - #### collectionContaining

          public IsCollectionContaining collectionContaining(Constraint elementConstraint)

      Since:
        1.1.0

    - #### collectionContaining

          public IsCollectionContaining collectionContaining(java.lang.Object element)

      Since:
        1.1.0

    - #### arrayContaining

          public IsArrayContaining arrayContaining(Constraint elementConstraint)

      Since:
        1.1.0

    - #### arrayContaining

          public IsArrayContaining arrayContaining(java.lang.Object element)

      Since:
        1.1.0

    - #### arrayContaining

          public IsArrayContaining arrayContaining(boolean element)

      Since:
        1.1.0

    - #### arrayContaining

          public IsArrayContaining arrayContaining(byte element)

      Since:
        1.1.0

    - #### arrayContaining

          public IsArrayContaining arrayContaining(short element)

      Since:
        1.1.0

    - #### arrayContaining

          public IsArrayContaining arrayContaining(char element)

      Since:
        1.1.0

    - #### arrayContaining

          public IsArrayContaining arrayContaining(int element)

      Since:
        1.1.0

    - #### arrayContaining

          public IsArrayContaining arrayContaining(long element)

      Since:
        1.1.0

    - #### arrayContaining

          public IsArrayContaining arrayContaining(float element)

      Since:
        1.1.0

    - #### arrayContaining

          public IsArrayContaining arrayContaining(double element)

      Since:
        1.1.0

    - #### mapContaining

          public IsMapContaining mapContaining(Constraint keyConstraint,
                                      Constraint valueConstraint)

      Since:
        1.1.0

    - #### mapContaining

          public IsMapContaining mapContaining(java.lang.Object key,
                                      java.lang.Object value)

      Since:
        1.1.0

    - #### mapWithKey

          public IsMapContaining mapWithKey(java.lang.Object key)

      Since:
        1.1.0

    - #### mapWithKey

          public IsMapContaining mapWithKey(Constraint keyConstraint)

      Since:
        1.1.0

    - #### mapWithValue

          public IsMapContaining mapWithValue(java.lang.Object value)

      Since:
        1.1.0

    - #### mapWithValue

          public IsMapContaining mapWithValue(Constraint valueConstraint)

      Since:
        1.1.0