Hi
This rule will never trigger a validation error with your test. The rule states that the SelectedFolderTypeId property is valid when it is equal to 2 and IsFolder is false.
In your test you specify a SelectedFolderTypeId of 2 and IsFolder to be false, which meets the criteria of the rule, meaning that the property is valid, so no error will be created. The equal rule means "must be equal to" (which it is).
It seems to me that your rule should check if the value is NOT equal to 2 as the valid criteria.
Jeremy