testdriven.com Wrangling quality out of chaos

Posts Tagged ‘Mock Objects’

MockPP: Mock Objects for C++

05.25.2004 · Posted in Links

MockPP’s goal is to facilitate developing unit tests in C++, in the spirit of Mock Objects for Java, EasyMock and jMock.

[url=http://www.testdriven.com/search.php?query=mock&action=results]Mock objects[/url] allow you to set up predictable behaviour to help you test your production code by emulating some functionality your code depends on. This might for example be a huge database which is too difficult and time-consuming to maintain just for testing purposes.
link

.NET MockObjects

02.20.2004 · Posted in Links

The .NET Mock Objects project is a .NET framework whose goal is to facilitate developing unit tests in the mock object style.

See also the .NET MockObjects wiki at http://dotnetmock.sourceforge.net/tikiwiki/tiki-index.php
link

MakingStubs

12.23.2003 · Posted in Links

Martin Fowler writes:

"A common problem with test-enhanced designs is how to create Service Stubs in test mode while letting the real thing be there for production (and for some tests). A couple of my colleagues have shared their ideas.
Jeremy Stell-Smith showed me an approach based on an Abstract Factory. All stubbable services are pulled from a single factory. This example shows such a Persistance class."
link

jMock: Java code-testing library using mock objects

12.22.2003 · Posted in Links

Mock objects help you design and test the interactions between the objects in your programs.

The jMock package:

* makes it quick and easy to define mock objects, so you don’t break the rhythm of programming.
* lets you define flexible constraints over object interactions, reducing the brittleness of your tests.
* is easy to extend for application specific scenarios.
link

Mock Objects

05.09.2003 · Posted in Links

The Mock Objects project is a generic unit testing framework whose goal is to facilitate developing unit tests in the mock object style. The goal of this project is to provide a core mock objects framework, a methodology for developing and using mock objects, a default set of mock implementation for the standard Java platform APIs, mock implementations for more specialised libraries.
link

StrutsTestCase for JUnit v2.0

05.09.2003 · Posted in Links

StrutsTestCase for JUnit is an extension of the standard JUnit TestCase class that provides facilities for testing code based on the Struts framework. StrutsTestCase provides both a Mock Object approach and a Cactus approach to actually run the Struts ActionServlet, allowing you to test your Struts code with or without a running servlet engine. Because StrutsTestCase uses the ActionServlet controller to test your code, you can test not only the implementation of your Action objects, but also your mappings, form beans, and forwards declarations. And because StrutsTestCase already provides validation methods, it’s quick and easy to write unit test cases.

Author: Deryl Seale
link

Polygenix White Paper on Object Substitution

04.15.2003 · Posted in Links

Mock objects are a powerful and flexible mechanism for substituting an imposter as a parameter to the class under test. In many cases, however, the collaborations with the class under test are not parameterized — for example: an attribute that is not supplied to the constructor; objects that are created or referenced via static factories; or new instances of collaborations that are created by the class.
Object Substitution is a technique developed by Polygenix to enable the developer to replace such collaborations with the class under test without modifying the original source code.

The Polygenix staff
Polygenix
March 10, 2003

link