public class MockMakerTest
extends junit.framework.TestCase
Modifier and Type | Field and Description |
---|---|
private MockCodeWriter |
myMockCodeWriter |
private static Configuration |
TEST_CONFIGURATION |
Constructor and Description |
---|
MockMakerTest(java.lang.String name) |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
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
private MockCodeWriter myMockCodeWriter
private static final Configuration TEST_CONFIGURATION
public static void main(java.lang.String[] args)
private MockMaker newMockMaker(java.lang.String interfaceName)
public void setUp()
setUp
in class junit.framework.TestCase
public static junit.framework.Test suite()
public void testMakeMockForClass() throws java.lang.Exception
java.lang.Exception
public void testMakeMockForInterfaceWithInheritedMethod() throws java.lang.Exception
java.lang.Exception
public void testMakeMockForInterfaceWithNoMethods() throws java.lang.Exception
java.lang.Exception
public void testMakeMockForInterfaceWithOneArrayParameterMethod() throws java.lang.Exception
java.lang.Exception
public void testMakeMockForInterfaceWithOneStringParameterMethod() throws java.lang.Exception
java.lang.Exception
public void testMakeMockForInterfaceWithOneStringReturningMethod() throws java.lang.Exception
java.lang.Exception
public void testMakeMockForInterfaceWithOneVoidMethod() throws java.lang.Exception
java.lang.Exception
public void testMakeMockForNonExistantClass()
private void verify()
private java.lang.String addExpectedValuesString(java.lang.String methodName)
private java.lang.String setActualReturnValueString(java.lang.String methodName)
private java.lang.String setActualReturnExceptionString(java.lang.String methodName)
private java.lang.String setExpectedCallsString(java.lang.String methodName)
public void testMakeMockForInterfaceWithExceptionThrowingMethod() throws java.lang.Exception
java.lang.Exception
public void testMakeMockForInterfaceWithOnePrimitiveReturningMethod() throws java.lang.Exception
java.lang.Exception
public void testMakeMockForInterfaceWithOverloadedMethod() throws java.lang.Exception
java.lang.Exception
public void testMakeMockForInterfaceWithOverloadedMethodWithArrayParameter() throws java.lang.Exception
java.lang.Exception
public void testMakeMockForInterfaceWithPrimitiveTypes() throws java.lang.Exception
java.lang.Exception
public void testMakeMockForSubclass() throws java.lang.Exception
java.lang.Exception
public void testMakeMockFromSource() throws java.lang.Exception
java.lang.Exception
public void testMakeMockWithPackage() throws java.lang.Exception
java.lang.Exception
public void testMakeMockFromSourceWithCorrectNamedParameters() throws java.lang.Exception
java.lang.Exception
private ClassStructure createSourceClassStructure(java.lang.String in)