Wednesday, November 24, 2010

Validation Application Block and Unit Testing

The Enterprise Library VAB is a very sane way of maintaining validation rules for your Model entities. I love the idea that you can keep the validation rules in a separate configuration file, because that enables you to more clearly check what rules are being applied, the messages, etc, without having to open many files.

The problem with this approach is that unit tests will fail to open the .config is usual circumstances, which will frustrate many developer. But, like almost everything in life, there's a solution, and a good one.

Check it here.

No comments :

Post a Comment