Ben Foster 7/4/2012

Using BDD specs for unit testing

Read Original

The article demonstrates how to write unit tests using Behavior-Driven Development (BDD) specifications, contrasting them with traditional NUnit tests. It uses a slug validation regex as an example, showing how BDD specs produce more descriptive output by clearly defining scenarios, contexts, and expected behaviors, which is especially useful for testing related edge cases.

Using BDD specs for unit testing

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser