Tag Archives: Code

Lightweight Context/Specification BDD in C#

Behavior-Driven Development (BDD) provides all of the engineering benefits of traditional Test-Driven Development (TDD) while additionally resulting in a specification that non-developers can read and validate. At its heart, BDD transforms the tests of TDD into specifications. Those specifications are … Continue reading

Posted in Agile, Code | Tagged , , , | Leave a comment

A Nifty Extension Method for Mapping Property Values by Name

Here is a nice little C# extension method that allows you to copy all of the properties from one object to another where the names match. SetPropertiesByName(this object target, object source) { PropertyInfo[] sourceProperties = source.GetType().GetProperties(); PropertyInfo[] targetProperties = target.GetType().GetProperties(); … Continue reading

Posted in Code | Tagged , , | Leave a comment

Spell-Checking for ReSharper

Your code will be written once. It will be read (by you and others) many times. Code should be easy to read. This means that I should be able to scan a screen full of code and get a sense … Continue reading

Posted in Tools | Tagged , , , , | Leave a comment