Skip to content

Instantly share code, notes, and snippets.

@darrelmiller
Created May 27, 2013 20:57
Show Gist options
  • Save darrelmiller/5659050 to your computer and use it in GitHub Desktop.
Save darrelmiller/5659050 to your computer and use it in GitHub Desktop.
public class StringExtensionsSpecifications
{
[Scenario]
[Example("Given", StepType.Given)]
[Example("When", StepType.When)]
[Example("Then", StepType.Then)]
[Example("But", StepType.But)]
[Example("And", StepType.And)]
public void GetStepType(string clause, StepType expected, StepType actual)
{
// Given a string starts with {clause}
var clause = clause + " foo";
// When GetStepType() is called
actual = StringExtensions.GetStepType(clause);
// Then {StepType} is returned"
Assert.Equal(actual,expected);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment