zur Startseite


 Home
 Contact
+MockCreator
+Competence
+Projects
 XPedition german content
 Feedback


 deutschenglish



download zip      deutscher text

latest News

July 2003 MockCreator has moved to SourceForge. New Releases will only be available there.

August 26th, 2002
Feature release 0.2.4 for eclipse: Class files even out of jars can be used to generate MockObjects.

August 12th, 2002
Bugfix release 0.2.3 for eclipse: The GUI can be resized now to make long package names visible.

August 8th, 2002
Bugfix release 0.2.2 for eclipse: MockCreator is able to generate MockObjects in Projects not located under ECLIPSE_HOME/workspace.

Documentation of generated MockObjects

This 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 right click on an interface in the Package-Explorer of eclipse and select one of the four submenus of MockObjectCreator.

Eclipse Menu

The submenus are:

Create MockObject (GUI)

This is like the old Create Mockobject from VisualAge. With this option you can create a mockobject via dialog by selecting project and package to create the mockobject in.

click to enlarge

Create MockObject in same package

Creates a mockobject in the same package as the interface.

Create MockObject in *.test package

Creates 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.* package

Creates 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

To install the MockCreator unpack the content of the directory MockCreator_XY/eclipse2 from download archive to the directory ECLIPSE_HOME/plugins. Make sure to preserve folder names when extracting the archive. After that restart eclipse.

Prior to creating the first mockobject import the five classes from the jar-file de.abstrakt.mock.jar into eclipse or include them into the project path. The jar file contains the base classes for the generated mockobjects and an ExpectationList that has been slightly modified to throw an AssertionFailedError when methods are called on the mockobject that were not expected.

One more prerequisite is the integration of the package com.mockobjects which can be downloaded from Sourceforge. It contains the base classes for the ExpectationList.

Unresolved matters

  • MockCreator doesn't work for interfaces without package (aka "default package")