kevinohara80/sfdc-trigger-framework

View on GitHub

Showing 1 of 1 total issue

Apex unit test classes should have at least one System.assert() or assertEquals() or AssertNotEquals() call
Open

  static void testVirtualMethods() {
Severity: Minor
Found in src/classes/TriggerHandler_Test.cls by pmd

ApexUnitTestClassShouldHaveAsserts

Since: PMD 5.5.1

Priority: Medium

Categories: Bug Risk

Remediation Points: 5000000

Apex unit tests should include at least one assertion. This makes the tests more robust, and using assert with messages provide the developer a clearer idea of what the test does.

Example:

@isTest
public class Foo {
 public static testMethod void testSomething() {
 Account a = null;
 // This is better than having a NullPointerException
 // System.assertNotEquals(a, null, 'account not found');
 a.toString();
 }
}
Severity
Category
Status
Source
Language