[Test]
public void WhenMyStringPropertyIsEmptyThenMyEntityMustBeInvalid()
{
var myEntity = new Entity { MyStringProperty = string.Empty };
Assert.That(myEntity, "MyStringProperty".IsIncludedInBrokenRules());
}
IsIncludedInBrokenRules() is an extension method that returns an instance of a class that inherits Constraint.
No comments:
Post a Comment