My favorites | Sign in
Project Logo
                
Code license: Apache License 2.0
Labels: UnitTesting, Assertions
Links:
Blogs:
Feeds:
People details
Project owners:
  tsc...@lunaversesoftware.com
Project committers:
banister

Why ShouldIt?

Are you using specification extension methods for your test assertions? Unless you just picked up this habit, you have probably found yourself copying these methods from project to project and perhaps even modifying them to work with different testing frameworks. ShouldIt solves this problem by providing a common library of specification extensions that works with the major testing frameworks.

Get Started

To get started, build the solution, then in your test project reference:

No configuration is required.

ShouldIt.Clr contains the actual extensions methods -- so named because it contains methods that extend CLR BCL classes. ShouldIt.YourTestingFramework allows ShouldIt to work with your chosen testing testing framework. ShouldIt.Core glues the other two together.

Testing Frameworks

ShouldIt currently works with:

More specifically, it works with the binaries of these testing frameworks that ShouldIt references. To ensure compatibility, simple copy the testing framework binaries from the ShouldIt lib folder into your own test project.

If you must use a different version -- for example, if you are using Machine.Specifications, which also depends on a particular version of NUnit -- you can recompile ShouldIt with the needed version.

Recompiling will work in most cases. However, if the version you need has breaking changes to the assertion API, it will be necessary to extend ShouldIt with a new assertion provider library. To see what I mean, look at ShouldIt.MbUnit and ShouldIt.Gallio. These represent two different versions of MbUnit which have significantly different assertion APIs.

Extras And Future

If you are using Watin for web testing you might also reference ShouldIt.Watin for some useful assertions that target Watin classes. ShouldIt.Watin also serves to illustrate how we might add additional libraries to extend other frameworks.

The idea of ShouldIt is to start with the essentials and add on. You might soon find that some "should" method that you cannot live without is missing. If so, contribute!









Hosted by Google Code