Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Remember the DescriptionRules
method that we added to the BusinessValidations class to validate the
Description property of Destination and Trip? Those contain overall rules for writing
any description for the company, not just those for destinations.
Now we’ll modify the Description
in the ValidateTrip method to include
the dreaded smiley face emoticon and exclamation point:
Description="Hope you won't be freezing on this trip! :)"
Before running the ValidateTrip
method again, keep in mind that the values of this Trip instance break four rules:
The StartDate is not at least
a full calendar day before the EndDate.
The word freezing is in the
description.