Skip to content
Branch: master
Go to file
Code

Latest commit

Files

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

README.md

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

You can’t perform that action at this time.