Skip to content

Commit

Permalink
Use translated picklist values in RD2_StatusAutomationSettings_TEST
Browse files Browse the repository at this point in the history
  • Loading branch information
npsp-reedestockton committed Nov 28, 2023
1 parent 83021df commit 03b559b
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,27 @@ private class RD2_StatusAutomationSettings_TEST {
)
);

String translatedLapsedStatus =
UTIL_Describe.getTranslatedPicklistLabel(npe03__Recurring_Donation__c.SObjectType,
npe03__Recurring_Donation__c.Status__c, RD2_Constants.STATUS_LAPSED);
String translatedClosedStatus =
UTIL_Describe.getTranslatedPicklistLabel(npe03__Recurring_Donation__c.SObjectType,
npe03__Recurring_Donation__c.Status__c, RD2_Constants.STATUS_CLOSED);

RD2_StatusAutomationView view = RD2_StatusAutomationSettings_CTRL.getAutomationSettings();

System.assertEquals(true, view.rd2Enabled, 'RD2 should be enabled');
System.assertEquals(DAYS_FOR_LAPSED, view.numberOfDaysForLapsed,
'The view state should retrieve the correct number of days for Lapsed');
System.assertEquals(DAYS_FOR_CLOSED, view.numberOfDaysForClosed,
'The view state should retrieve the correct number of days for Closed');
System.assertEquals(RD2_Constants.STATUS_LAPSED, view.lapsedStatus,
System.assertEquals(translatedLapsedStatus, view.lapsedStatus,
'The view state should retrieve the correct Automation Lapsed Status');
System.assertEquals(RD2_Constants.STATUS_CLOSED, view.closedStatus,
System.assertEquals(translatedClosedStatus, view.closedStatus,
'The view state should retrieve the correct Automation Closed Status');
System.assertEquals( RD2_Constants.STATUS_LAPSED, view.lapsedStatusOption[0].label,
System.assertEquals(translatedLapsedStatus, view.lapsedStatusOption[0].label,
'The Lapsed status picklist option should include Lapsed Status');
System.assertEquals(RD2_Constants.STATUS_CLOSED, view.closedStatusOption[0].label,
System.assertEquals(translatedClosedStatus, view.closedStatusOption[0].label,
'The Closed status picklist option should include Closed Status');
}

Expand Down

0 comments on commit 03b559b

Please sign in to comment.