From 7c6277c8b8d3f19636be43e280d7ba9548c11c2f Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Mon, 29 Aug 2022 19:05:40 +0200 Subject: [PATCH] [apex] Update tests (ApexUnitTestClassShouldHaveAsserts, ApexAssertionsShouldIncludeMessage) #4097 --- .../ApexAssertionsShouldIncludeMessage.xml | 68 +++++++++++++++++++ .../ApexUnitTestClassShouldHaveAsserts.xml | 4 +- 2 files changed, 70 insertions(+), 2 deletions(-) diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/rule/bestpractices/xml/ApexAssertionsShouldIncludeMessage.xml b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/rule/bestpractices/xml/ApexAssertionsShouldIncludeMessage.xml index f05e9124dab..7a499d556aa 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/rule/bestpractices/xml/ApexAssertionsShouldIncludeMessage.xml +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/rule/bestpractices/xml/ApexAssertionsShouldIncludeMessage.xml @@ -116,4 +116,72 @@ public class Foo { } ]]> + + + [apex] Support new Assert class (Apex v56.0) - negative test case #4097 + 9 + 6,12,19,28,34,40,46,52,58 + + diff --git a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/rule/bestpractices/xml/ApexUnitTestClassShouldHaveAsserts.xml b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/rule/bestpractices/xml/ApexUnitTestClassShouldHaveAsserts.xml index 28ba29690b3..686ffd3cb65 100644 --- a/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/rule/bestpractices/xml/ApexUnitTestClassShouldHaveAsserts.xml +++ b/pmd-apex/src/test/resources/net/sourceforge/pmd/lang/apex/rule/bestpractices/xml/ApexUnitTestClassShouldHaveAsserts.xml @@ -76,13 +76,13 @@ private class C2_Assignment_Report_Job_Test { #1089 [apex] ApexUnitTestClassShouldHaveAsserts: Verify use of additionalAssertMethodPattern, positive test - (Assert\.\w+|verify\w+) + (MyAssert\.\w+|verify\w+) 0