Fork me on GitHub

Features

Everything In One Packge

The SpecsFor package contains everything you need for a new test project. Just add the NuGet package or download a ready-to-use archive, and you're all set with NUnit, Moq, ExpectedObjects, Should, and more. [Read More]

Flexible Base Fixture

The included base test fixture handles many common testing concerns for you automatically, leaving you free to write tests the way you want to write them. [Read More]

Additional Test Helpers

SpecsFor includes additional helpers to address common points of testing friction. Easily assert that two objects look the same, or set up expectations with Moq without complicated nested lambda expressions. [Read More]

Built For Extensibility

SpecsFor exposes numerous extension points, enabling you to customize the behavior of your tests to meet complex testing challenges. [Read More]

Everything In One Package

The SpecsFor package contains everything you need for a new test project. Just add the NuGet package or download a ready-to-use archive, and you're all set with NUnit, Moq, ExpectedObjects, Should, an auto-mocking test fixture, and additional helpers to simplify your tests. No more spending 10 minutes adding packages to your project. Just add SpecsFor, and get everything else you need automatically.

Auto-Mocking Base Fixture

Creating the class you want to test can become a real chore, especially when dependencies change. With SpecsFor's auto-mocking base fixture, you can stop worrying about manually creating and supplying mocks; SpecsFor will take care of all that for you. You can easily access mock instances at any time to establish or verify behavior. The base fixture also makes it easy to write Behavior-Driven Development style tests, as shown in this example:

Additional Test Helpers

SpecsFor includes helpers to alleviate common points of testing pain. Utilize the Looks.Like class to simplify mocking, or use the new object.ShouldLookLike extension method to compare the public members of two instances. New helpers will be continually added in the future.

Built For Extensibility

While SpecsFor enables BDD-style testing, it doesn't require it. Everything in SpecsFor's base fixture is virtual, so you can customize or extend its behavior to handle almost any testing scenario.

Ready To Test?

The easiest way to get started with SpecsFor is to install it with NuGet.

PM> Install-Package SpecsFor