|
|
|
|||
Home Contact MockCreator Competence Projects XPedition Feedback ![]() ![]() ![]()
|
Documentation of generated MockObjectsThis document contains only the documentation for usage and installation within eclipse 2.0. You will find the documentation of the generated classes here.Usage:To create a mockobject simply right-click on an interface in VisualAge and select one of the four submenus of MockObjectCreator in the Tools Menu.
The submenus are: Create MockObject (GUI)This is like the old Create Mockobject. With this option you can create a mockobject via dialog by selecting the package to create the mockobject in.Create MockObject in same packageCreates a mockobject in the same package as the interface. Create MockObject in *.test packageCreates a mockobject in the subpackage test of the package of the interfaces. If for example the interface is in com.somedomain.someapplication.apackage the mockobject will be created in com.somedomain.someapplication.apackage.test . Create MockObject in test.* packageCreates a mockobject in a package that starts with test and after that the package of the interfaces. If for example the interface is in com.somedomain.someapplication.apackage the mockobject will be created in test.com.somedomain.someapplication.apackage . The last three options do not open a GUI-Dialog and are therefore much faster.Installation
Before creating the first mockobject, import the two java classes from the jar file de_abstrakt_mock.jar into VisualAge. It contains the base class for the generated mockobjects and an ExpectationList which was slightly modified to throw an AssertionFailedError if methods where called on the mockobject which where not specified as expected in the tests. The third prerequisite is the import of the package com.mockobjects downloadable from sourceforge. It contains the base class for the modified ExpectationList. |
|||