November 12, 2007 - 22:40 UTC - Tags: .NET BDD .NetSpec testing
I've added a couple of new features to .NetSpec.
StringsFor strings, two (or four) new behavior specifications are available:
- ShouldContain / ShouldNotContain - allows you to specify that you expect a string to contain/not contain a given substring
- ShouldMatch / ShouldNotMatch - allows you to specify that you expect a string to match/not match a given regular expression
You can read more about these features on the pages of the .NetSpec
3.5 and
2.0 versions respectively.
Lists/enumerablesFor enumerables, one (or two) new behavior specifications are available:
- ShouldContain / ShouldNotContain - allows you to specify that you expect the enumerable to contain/not contain a given object
You can read more about these features on the pages of the .NetSpec
3.5 and
2.0 versions respectively.
.NetSpecExporterThe .NetSpecExporter is an
AgileDox-like exporter allowing you to generate a listing of the expected behavior of your classes based upon your tests. You can read more about it and see an example
here. You can use this tool without using .NetSpec as it generates the list by looking for the TestClass and TestMethod attributes.