Skip to content

Instantly share code, notes, and snippets.

@mitchdenny
Created December 31, 2010 02:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mitchdenny/760628 to your computer and use it in GitHub Desktop.
Save mitchdenny/760628 to your computer and use it in GitHub Desktop.
This is a specification for a calculator with no implementation provided.
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MSTestContrib.Specifications;
namespace Calculator.Core.Specifications
{
[TestClass]
[SpecificationDescription("As a user I want to perform mathematical calculations so that my head doesn't hurt.")]
public class BasicCalculatorSpecification : Specification
{
[TestMethod]
[ScenarioDescription("Add two to a calculator with zero on the accumulator.")]
public void AddTwoToACalculatorWithZeroOnTheAccumulator()
{
Given("a calculator with zero on the accumulator")
.When("I add two to the accumulator")
.Then("the accumulator should show two");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment