diff --git a/feed.xml b/feed.xml
index 16a738535f..f74a2fa3fc 100644
--- a/feed.xml
+++ b/feed.xml
@@ -5,8 +5,8 @@
Since: PMD 6.13.0
Priority: Medium (3)
The second parameter of System.assert/third parameter of System.assertEquals/System.assertNotEquals is a message. -Having a second/third parameter provides more information and makes it easier to debug the test failure and improves the readability of test output.
+Having a second/third parameter provides more information and makes it easier to debug the test failure and +improves the readability of test output. -This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.bestpractices.ApexAssertionsShouldIncludeMessageRule
+This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.bestpractices.ApexAssertionsShouldIncludeMessageRule
Example(s):
@@ -1320,27 +1321,27 @@ Having a second/third parameter provides more information and makes it easier toUse this rule by referencing it:
-<rule ref="category/apex/bestpractices.xml/ApexUnitTestAssertStatement" />
+Use this rule with the default properties by just referencing it:
+<rule ref="category/apex/bestpractices.xml/ApexAssertionsShouldIncludeMessage" />
ApexUnitTestClassShouldHaveAsserts
@@ -1425,6 +1426,10 @@ As testMethod keyword is deprecated, Salesforce advices to use @isTest annotatio
static void methodBTest() {
}
@isTest static void methodCTest() {
+ System.assert(1==2);
+ }
+ @isTest static void methodCTest() {
+ System.debug('I am a debug statement');
}
private void fetchData() {
}
@@ -1445,26 +1450,26 @@ As testMethod keyword is deprecated, Salesforce advices to use @isTest annotatio
cc_categories
- Style
- Code Climate Categories
+ Bug Risk
+ Deprecated Code Climate Categories
yes. Delimiter is ‘|’.
cc_remediation_points_multiplier
- 1
- Code Climate Remediation Points multiplier
+ 100
+ Deprecated Code Climate Remediation Points multiplier
no
cc_block_highlighting
false
- Code Climate Block Highlighting
+ Deprecated Code Climate Block Highlighting
no
-Use this rule by referencing it:
+Use this rule with the default properties by just referencing it:
<rule ref="category/apex/bestpractices.xml/ApexUnitTestMethodShouldHaveIsTestAnnotation" />
diff --git a/search.json b/search.json
index 8682636225..52d6e252f5 100644
--- a/search.json
+++ b/search.json
@@ -213,6 +213,15 @@
}
,
+{
+"title": "ApexAssertionsShouldIncludeMessage (Apex, Best Practices)",
+"tags": "",
+"keywords": "ApexAssertionsShouldIncludeMessage",
+"url": "pmd_rules_apex_bestpractices.html#apexassertionsshouldincludemessage",
+"summary": "Rules which enforce generally accepted best practices."
+}
+,
+
{
"title": "ApexUnitTestClassShouldHaveAsserts (Apex, Best Practices)",
"tags": "",
@@ -222,6 +231,15 @@
}
,
+{
+"title": "ApexUnitTestMethodShouldHaveIsTestAnnotation (Apex, Best Practices)",
+"tags": "",
+"keywords": "ApexUnitTestMethodShouldHaveIsTestAnnotation",
+"url": "pmd_rules_apex_bestpractices.html#apexunittestmethodshouldhaveistestannotation",
+"summary": "Rules which enforce generally accepted best practices."
+}
+,
+
{
"title": "ApexUnitTestShouldNotUseSeeAllDataTrue (Apex, Best Practices)",
"tags": "",
@@ -247,24 +265,6 @@
"url": "pmd_rules_apex_bestpractices.html#avoidlogicintrigger",
"summary": "Rules which enforce generally accepted best practices."
}
-,
-
-{
-"title": "ApexUnitTestAssertStatement (Apex, Best Practices)",
-"tags": "",
-"keywords": "ApexUnitTestAssertStatement",
-"url": "pmd_rules_apex_bestpractices.html#apexunittestassertstatement",
-"summary": "Rules which enforce generally accepted best practices."
-}
-,
-
-{
-"title": "ApexUnitTestMethodShouldHaveIsTestAnnotation (Apex, Best Practices)",
-"tags": "",
-"keywords": "ApexUnitTestMethodShouldHaveIsTestAnnotation",
-"url": "pmd_rules_apex_bestpractices.html#apexunittestmethodshouldhaveistestannotation",
-"summary": "Rules which enforce generally accepted best practices."
-}