Imaging the following rule:
```
RuleForEach(command => command.Recipients)
.Length(9, 15)
WithMessage(Resources.ValidationMessages.SmsMessageRecipientInvalidLength);
```
The Recipients property is defined as ICollection<string>.
When the recipients collection contains strings with a length less than 9 or greater than 15 then a call to ShouldHaveValidationErrorFor results in an exception within the unit test (ValidationTestException: Expected a validation error for property Recipients).
```
RuleForEach(command => command.Recipients)
.Length(9, 15)
WithMessage(Resources.ValidationMessages.SmsMessageRecipientInvalidLength);
```
The Recipients property is defined as ICollection<string>.
When the recipients collection contains strings with a length less than 9 or greater than 15 then a call to ShouldHaveValidationErrorFor results in an exception within the unit test (ValidationTestException: Expected a validation error for property Recipients).