Skip to content

Instantly share code, notes, and snippets.

@adamralph
Created July 26, 2012 20:25
Show Gist options
  • Save adamralph/3184291 to your computer and use it in GitHub Desktop.
Save adamralph/3184291 to your computer and use it in GitHub Desktop.
xBehave.net collection contents example
[Scenario]
public static void GettingACollection
{
var provider = default(CollectionProvider);
var collection = default(Collection);
"Given a collection provider"
.Given(() => provider = new CollectionProvider());
"When getting a collection"
.When(() => collection = provider.GetCollection());
"Then the collection should contain 1,3 and 5"
.Then(() => collection.Should().Contain(new[] {1, 3, 5}));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment