Skip to content

derekgreer/nunit.specifications

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

NUnit.Specifications

NUnit.Specifications is a context/specification library for use with the NUnit testing framework.

Quickstart

The following is an example NUnit test written using the ContextSpecification base class from NUnit.Specifications:

using NUnit.Framework;
using NUnit.Specifications;

public class OrderSpecs
{
	[Subject("Order Processing")]
	public class when_a_customer_places_an_order: ContextSpecification
	{
		static OrderService _orderService;
		static bool _results;
		static Order _order;
		
		Establish context = () =>
		{
			_orderService = new OrderService();
			_order = new Order();
		};
		
		Because of = () => _results = _orderService.PlaceOrder(_order);

		It should_successfully_place_the_order = () => Assert.IsTrue(_results);
	}
}

See the NUnit.Specifications Wiki for more information and examples.

About

A context/specification library for use with the NUnit testing framework.

Resources

License

Stars

Watchers

Forks

Packages

No packages published