Skip to content

marcinbelczewski/developwithpassion.specifications

 
 

Repository files navigation

developwithpassion.specifications

developwithpassion.specifications is a formalization of some test utilities that I have been using for the last couple of years. It is written as a thin extension layer on top of the following 2 fantastic libraries:

With the help of Machine.Fakes it currently can be used to do interaction based testing with the following faking libraries:

  • FakeItEasy
  • Moq
  • Rhino.Mocks
  • NSubstitute

Thanks to the Machine teams and Bjorn Rochel for the contributions that this library heavily leverages.

Contributing code

Getting Started

Building from source

  • Make sure you have the .Net Framework 4.0 installed on your machine.

Clone the repository from github and run the following command at a command prompt:

  • build.cmd dist:zip

If the build does not work, please submit an issue through a pull request. After a succesful build you will find all of the zip files under the distribution/zips folder. Currently only 5 of the zip files created are important:

  • developwithpassion.specifications.zip - Contains the core library
  • developwithpassion.specifications.rhinomocks.zip - Contains the adapters for Machine.Fakes.RhinoMocks
  • developwithpassion.specifications.fakeiteasy.zip - Contains the adapters for Machine.Fakes.FakeItEasy
  • developwithpassion.specifications.nsubstitute.zip - Contains the adapters for Machine.Fakes.NSubstitute
  • developwithpassion.specifications.moq.zip - Contains the adapters for Machine.Fakes.Moq

Getting developwithpassion.specifications via NuGet

Installing with NuGet is a snap. There are currently 4 packages available on NuGet (one for each of the Machine.Fakes adapter libraries). To use with Rhino.Mocks for example, just launch the package manager console and type:

  • install-package developwithpassion.specifications.rhinomocks

This will install all of the necessary dependencies for the library. The other packages that you could choose are:

  • developwithpassion.specifications.fakeiteasy
  • developwithpassion.specifications.moq
  • developwithpassion.specifications.nsubstitute

How to use it

The core of the functionality in developwithpassion.specifications can be accessed by deriving your test classes from one of the following 3 classes:

  • Observes
  • Observes< ClassToTest >
  • Observes< Contract , Class >

The last 2 classes provide access to automatic creation of the system under test.

The developwithpassion.specifications.examples project contains many examples of how to use different features of the library. Feel free to contribute other examples as you see fit.

Develop With Passion®

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 64.3%
  • C# 20.6%
  • C 14.4%
  • Shell 0.7%