Skip to content

Commit

Permalink
Merge pull request #1179 from SFDO-Community/feature/integrate-npsp-tdtm
Browse files Browse the repository at this point in the history
Fix missing namespace and handle namespace the same way in test classes.
  • Loading branch information
Szandor72 authored Apr 2, 2022
2 parents 4a677cc + c31ddb7 commit 2d1e190
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 2 additions & 4 deletions dlrs/main/classes/RollupController.cls
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,6 @@ public with sharing class RollupController {
// Display currently deployed code for confirmation
return RollupTriggerTest.Body;
else {
// Namespace?
String namespace = Utilities.namespace();
// Deploy generated code
return '/**\n' +
' * Auto Generated and Deployed by the Declarative Lookup Rollup Summaries Tool package (dlrs)\n' +
Expand All @@ -216,10 +214,10 @@ public with sharing class RollupController {
RollupTriggerName +
' to be invoked, fails the test if org config or other Apex code prevents this.\n' +
' ' +
(namespace.length() > 0 ? namespace + '.' : '') +
Utilities.classPrefix() +
'RollupService.disableNpspTdtm();\n' +
' ' +
(namespace.length() > 0 ? namespace + '.' : '') +
Utilities.classPrefix() +
'RollupService.testHandler(new ' +
RollupSummary.ChildObject +
'());\n')) +
Expand Down
4 changes: 3 additions & 1 deletion dlrs/main/classes/RollupControllerTest.cls
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ private class RollupControllerTest {
' // Force the ' +
controller.RollupTriggerName +
' to be invoked, fails the test if org config or other Apex code prevents this.\n' +
' RollupService.disableNpspTdtm();\n' +
' ' +
Utilities.classPrefix() +
'RollupService.disableNpspTdtm();\n' +
' ' +
Utilities.classPrefix() +
'RollupService.testHandler(new ' +
Expand Down

0 comments on commit 2d1e190

Please sign in to comment.