org.jmock.core
Class MockObjectSupportTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.jmock.core.VerifyingTestCase
              extended by org.jmock.core.MockObjectSupportTestCase
All Implemented Interfaces:
Test
Direct Known Subclasses:
MockObjectTestCase

public abstract class MockObjectSupportTestCase
extends VerifyingTestCase

Since:
1.0

Field Summary
static Constraint ANYTHING
           
static Constraint NOT_NULL
           
static Constraint NULL
           
 
Constructor Summary
MockObjectSupportTestCase()
           
MockObjectSupportTestCase(String name)
           
 
Method Summary
 And and(Constraint left, Constraint right)
           
 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(Object actual, Constraint constraint)
           
 void assertThat(short actual, Constraint constraint)
           
 StringContains contains(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(Object operand)
           
 IsEqual eq(short operand)
           
 HasProperty hasProperty(String propertyName)
           
 HasPropertyWithValue hasProperty(String propertyName, Constraint expectation)
           
 IsInstanceOf isA(Class operandClass)
           
 Object newDummy(Class dummyType)
           
 Object newDummy(Class dummyType, String name)
           
 Object newDummy(String name)
           
 IsNot not(Constraint c)
           
 Or or(Constraint left, Constraint right)
           
 IsSame same(Object operand)
           
 StringContains stringContains(String substring)
           
 
Methods inherited from class org.jmock.core.VerifyingTestCase
registerToVerify, runBare, unregisterToVerify, verify
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runTest, setName, setUp, tearDown, 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
 
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(String name)
Method Detail

eq

public IsEqual eq(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(Object operand)

isA

public IsInstanceOf isA(Class operandClass)

stringContains

public StringContains stringContains(String substring)

contains

public StringContains contains(String substring)

not

public IsNot not(Constraint c)

and

public And and(Constraint left,
               Constraint right)

or

public Or or(Constraint left,
             Constraint right)

newDummy

public Object newDummy(Class dummyType)

newDummy

public Object newDummy(Class dummyType,
                       String name)

newDummy

public Object newDummy(String name)

assertThat

public void assertThat(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(String propertyName,
                                        Constraint expectation)
Since:
1.1.0

hasProperty

public HasProperty hasProperty(String propertyName)
Since:
1.1.0