public class SurrogateManagerTestCase extends TestCase (Code)
Tests the SurrogateManager.
Note that this testCase will be woven by the test framwork so that it can
test that its own classes are "mocked" ! Keep this in mind when trying to
understand the code
author: Per S Hustad
testClassCastException() Verifies that the SurrogateManager returns mocks corresponding to the
signature of the declared method in execution and call pointcuts.
I.e.
Verifies that the SurrogateManager returns mocks corresponding to the
signature of the declared method in execution and call pointcuts.
I.e. when casting the class to another class, we might get a
ClassCastException
throws: Exception -
testGetMockObject_ForClass
public void testGetMockObject_ForClass() throws Exception(Code)
test the getMockObjectForInterface
testGetMockObject_ForInterface
public void testGetMockObject_ForInterface() throws Exception(Code)
Test basic AspectJ pointcut pcGetInterfaceOrClass interaction. In the
AspectJ file, we have defined a pointcut intercepting the calls to
"getInterfaceToMock"
testSetMockMethodAndObject
public void testSetMockMethodAndObject() throws Exception(Code)
Test that if we register both a Mock Method and a mock object
corresponding to a poinctut, the MockMethod takes precedence
throws: Exception - if unexpected failure