devxlogo

Testing a Business Rule Should Not Have Any Side Effects

Testing a Business Rule Should Not Have Any Side Effects

Testing a business rule should have no side effects. Avoid err.raise and msgboxes inside business rule tests.
Consider this example:

 public const kMinimumApplicantAge = 18  'declared in common modPublic Function IsApplicantAgeEligible(DOB as date, testDate as date) asboolean    If datediff(

devx-admin

Share the Post: