Skip to content
Discussion options

You must be logged in to vote

If you are creating a rule that is designed for reuse across any type of business class, then you need to pass properties as parameters to the constructor.

If you are creating a private rule for one specific business class, then you can hard-code the properties into the rule. Personally I try to nest these rules inside the business class to make it clear that they are "private". You can also mark them private, but that makes it harder to write unit tests for the rule.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Chicagoan2016
Comment options

@rockfordlhotka
Comment options

Answer selected by Chicagoan2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants