Login

    Register

Managed Hosting

PROJECT CATEGORIES

 

ColdMock
Project Home Blog Forums Wiki Known Issues Contact Project

Author: Brian Kotek (All RIAForge projects by this author)
Last Updated: March 21, 2008 10:58 AM
Version: 1.01
Views: 79,177
Downloads: 1,682
License: Apache License, Version 2

Description:

ColdMock makes unit testing easier by letting you dynamically create Mock objects and define what results the methods of the mock object return. For a full explanation of the benefits of using Mock objects, please check out the definition at Wikipedia:

http://en.wikipedia.org/wiki/Mock_object.

Recently Added:

Ability to determine how many times a method call in a mocked object was run by using methodCallCount(methodName).

Added a debug method called coldMock_debug() to the mocked objects to view the internal variables scope aid in any debugging issues with mocking.

Features include:

* Because the Mock objects are typed the same as the original objects (they actually ARE the original objects, with their methods removed), the Mocks will pass any CFC type checking in any objects that use the Mocks.

* The Mock objects will validate any argument and return types of method calls.

* Allows you to specify a series of return values for a method on a Mock object. This will return each specified result in order as the method is called on the Mock object.

Updated on 11/14/07 to include support for methods inherited from superclasses, and to validate the types on returned arrays of components (thanks to João Fernandes for contributing the array validation check).

Updated on 3/7/08 to include support for mocking injected methods that do not exist in the component metadata.

Requirements:

ColdFusion 8 (OnMissingMethod() is the only way to respond to the method calls on the Mock object).

Issue Tracker:

ID ISSUE STATUS UPDATED
4 cannot mock CF9 implicit getter/setter Open 12/29/09 4:05 PM
3 mock.invalidType Open 11/27/09 5:04 PM
2 Bean creation exception in coldmock.MockFactory Closed 11/01/09 8:23 PM
1 Will not property deal with types that use CFC array syntax. Fixed 11/14/07 11:15 AM

View All Issues

To enter issues for this (or any other) project, you must be logged in.

Subversion Access:

You may access this project's Subversion repository with your client here: http://svn.riaforge.org/coldmock.

To view files and changelists associated with this repository, go here: http://coldmock.riaforge.org/index.cfm?event=page.svnbrowse.

Anonymous users have read access to the repository while the administrator has write access.

This project is sharing its code via Subversion. Subversion is an open source source control method. You may find more information about Subversion here: http://subversion.tigris.org/