Rationale

As a best practice, all assertions should include a comment to describe the rationale or the expected outcome.

Scope

  • Apex methods annotated with @isTest
  • Apex methods with the testMethod modifier

Exclusions

  • This rule will not fire for assertion-equivalent methods performed using third party libraries, such as fflib_ApexMocks

Did this answer your question?