From fe8986d02d285d790bdc91c3d5de5df698a7c0bc Mon Sep 17 00:00:00 2001 From: Reede Stockton Date: Fri, 1 Apr 2022 13:35:31 -0700 Subject: [PATCH] Fix missing namespace and handle namespace the same way in test classes. --- dlrs/main/classes/RollupController.cls | 6 ++---- dlrs/main/classes/RollupControllerTest.cls | 4 +++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlrs/main/classes/RollupController.cls b/dlrs/main/classes/RollupController.cls index ac78250c..8bcfde3b 100644 --- a/dlrs/main/classes/RollupController.cls +++ b/dlrs/main/classes/RollupController.cls @@ -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' + @@ -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')) + diff --git a/dlrs/main/classes/RollupControllerTest.cls b/dlrs/main/classes/RollupControllerTest.cls index 2102edeb..53d3abcf 100644 --- a/dlrs/main/classes/RollupControllerTest.cls +++ b/dlrs/main/classes/RollupControllerTest.cls @@ -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 ' +