Skip to content
Behavior Driven Development (BDD) wrapper for .NET MsTests
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
h-behavior.tests
h-behavior
.gitattributes
.gitignore
LICENSE
README.md
Settings.StyleCop
appveyor.yml
gruntfile.js
h-behavior.sln
package.json
package.nuspec
rules.ruleset

README.md

h-behavior Build status NuGet Status

Behavior Driven Development (BDD) wrapper for .NET MsTests

Requirements

h-dependency works with .NET Framework 4.5 and higher

Usage

To use it, make your unit test class inherit from Hylasoft.Behavior.Spec:

[TestClass]
public class TestBehavior : Spec{

  //Your tests here

}

In your tests, instead of using Assert use the Expect().To... Syntax:

Expect(myBooleanValue).ToBeTrue();
Expect(myString).ToBe("qwertyuiop");
Expect(myInteger).ToNotBeInstanceOf(typeof(string));
Expect<Action>(MyFaultyMethod).ToThrowException<TypeLoadException>();

The following extensions are available if you include the namespace Hylasoft.Behavior.Extensions:

  • Exceptions
  • Enumerables and Collections
  • Comparable
  • Booleans

Build

You can build the project using Visual Studio or by running the grunt tasks for msbuild

Contribute

This project uses hylasoft/cs-boilerplate to define tasks and stle guides. Please read the readme of the project to learn more about how to contribute.

You can contribute by opening a pull request. Make sure your code complies with the quality standards by running the following task:

grunt test

Nuget

A nuget package is available. To install Hylasoft.Behavior, run the following command in the Package Manager Console:

PM> Install-Package Hylasoft.Behavior
You can’t perform that action at this time.