views:

142

answers:

0

Hello, I'm using Microsoft Enterprise Validation Library. If i have a

[NotNullValidator(MessageTemplate="Cannot be null!", Ruleset="validate_x")] public string x{ get; set; }

and then, in a test class i have: MyBO target=new MyBO { x=null }; and i wanna check if this is valid (using ValidationResult), and also that ruleset, the test passes. Why? Because x is null. It should fail.

Thanks