Skip to content

Commit d7a8dde

Browse files
authored
Merge pull request #29 from akohan91/bugfix/fix-pmd-issues
Fixed PMD issues.
2 parents ce91174 + 50ede7e commit d7a8dde

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

force-app/main/default/classes/tests/libak_TestRestProcessor.cls

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,42 @@
11
@IsTest
22
public with sharing class libak_TestRestProcessor {
3+
// Assertions are performed in the checkMethodNotAllowedResponse helper method
4+
@SuppressWarnings('PMD.ApexUnitTestClassShouldHaveAsserts')
35
@IsTest
46
static void testProcessGet(){
57
checkMethodNotAllowedResponse('GET');
68
}
79

10+
// Assertions are performed in the checkMethodNotAllowedResponse helper method
11+
@SuppressWarnings('PMD.ApexUnitTestClassShouldHaveAsserts')
812
@IsTest
913
static void testProcessPost(){
1014
checkMethodNotAllowedResponse('POST');
1115
}
1216

17+
// Assertions are performed in the checkMethodNotAllowedResponse helper method
18+
@SuppressWarnings('PMD.ApexUnitTestClassShouldHaveAsserts')
1319
@IsTest
1420
static void testProcessPut(){
1521
checkMethodNotAllowedResponse('PUT');
1622
}
1723

24+
// Assertions are performed in the checkMethodNotAllowedResponse helper method
25+
@SuppressWarnings('PMD.ApexUnitTestClassShouldHaveAsserts')
1826
@IsTest
1927
static void testProcessPatch(){
2028
checkMethodNotAllowedResponse('PATCH');
2129
}
2230

31+
// Assertions are performed in the checkMethodNotAllowedResponse helper method
32+
@SuppressWarnings('PMD.ApexUnitTestClassShouldHaveAsserts')
2333
@IsTest
2434
static void testProcessDelete(){
2535
checkMethodNotAllowedResponse('DELETE');
2636
}
2737

38+
// Assertions are performed in the checkMethodNotAllowedResponse helper method
39+
@SuppressWarnings('PMD.ApexUnitTestClassShouldHaveAsserts')
2840
@IsTest
2941
static void testProcessOther(){
3042
checkMethodNotAllowedResponse('OPTIONS');

force-app/main/default/classes/tests/libak_TestRestRouter.cls

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public with sharing class libak_TestRestRouter {
5050
Test.startTest();
5151

5252
try {
53-
libak_RestProcessor processor = router.newRestProcessor(
53+
router.newRestProcessor(
5454
request,
5555
new libak_TestErrorResponseFactory(),
5656
new TestRestLogger()
@@ -80,6 +80,8 @@ public with sharing class libak_TestRestRouter {
8080
}
8181
}
8282

83+
84+
@SuppressWarnings('PMD.EmptyStatementBlock')
8385
private class TestRestLogger implements libak_IRestLogger {
8486
public void initLog(RestRequest request) {}
8587
public void addErrorDetails(Exception exc) {}

0 commit comments

Comments
 (0)