Description

Doubler is a code generator that makes unit testing easier. It is especially useful when working with legacy code. It is a Reflector add-in, a tool already woven into your workflow. It will help you cleave dependencies apart, create test doubles, and write unit tests with little effort and less coding.

Features

Doubler is a Reflector add-in that helps with creating unit tests. It offers four code generators:

  • Recording Generator – Use against an abstract type. It will create a Recording Test Stub. Recorders generated have the following features for each method on the subject type:
    • Property named Called of type Boolean that records if the method was called.
    • Properties for each parameter passed named in the following format Passed<ParameterTypeName><ParameterName> of the same type as the parameter.
    • Property named ReturnValue of the same type as return type of the subject method. If subject method is void this property is not created. When the method is called the this value is returned.
    • Property named ExceptionToThrow of type Exception. When the method is called if this property is not null the property value is thrown.
  • Wrapper/Interface Generator – Use against a concrete type. It will create a mirror interface of the subject type and an implementation of the interface that passes all calls to a private instance of the subject type. This can be used to help control dependencies, allowing unit tests to insert a test double in place of the subject (run the Recording Generator on the mirror interface).
  • Fake Generator - Use against an abstract type. It will create a Fake Object.
  • Test Generator – Use against a concrete type. It will generate a unit test fixture and test methods for each public method on the test subject. The test methods will contain a start on the unit test.

Download

Version 0.5.5

doubler.zip

0.5.5 Changes:

  • Added logging tab.
  • Unit Test generator can now tracks calls to named parameters, writing test code for how each parameter is used.
  • No longer locks assemblies.

0.5 Changes:

  • Added drag file control.
  • Wrapper class members are all final.
  • Recorder method names that are shared with Object are marked with override or overload.
  • Wrapper class internals are marked as private and not part of the wrapper interface.

Example: unit_test_patterns.zip


Usage

Recorder Generator


Create New Recorder - This movie shows the creation of a new test stub recorder and adding it to a VS.NET project.
Use Recorder - This movie shows how to use the recorder in a unit test.
Example Recorder - This is the recorder generated and or used in the other movies.

Unit Test Generator


Create Unit Test - This movie shows the creation of a new unit test fixture, adding it to a VS.NET project, filling in some test values, and running the test.
Example Unit Test - This is the unit test generated in the previous movie.

Miscellaneous


Example Test Subject - This is the test subject for the above examples.
Drag and Drop - This is a quick clip of using the drag and drop feature.

--
Jay Flowers
----------------------------------------------------------------------
http://jayflowers.com
---------------------------------------------------------------------
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "MbUnit.User" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/MbUnitUser
-~----------~----~----~----~------~----~------~--~---

Reply via email to