-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'EDRD-Sprint-11' of https://github.com/bcgov/MoH-SAT int…
…o EDRD-952
- Loading branch information
Showing
50 changed files
with
1,487 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
dev-app-post/main/default/classes/EDRD_cls_HandleGroupsTest.cls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/********************************************************************************************** | ||
* @Author: Accenture | ||
* @Date: 20/12/2024 | ||
* @Description: The purpose of this class is to cover Code coverage of EDRD_cls_HandleGroups | ||
* @Revision(s): [Date] - [Change Reference] - [Changed By] - [Description] | ||
20 Dec - EDRD-1150 - Accenture - The purpose of this method is to Remove Committee based on ACR delete of EDRD_Committee & Provider OR Committee_Reviewer. | ||
***********************************************************************************************/ | ||
@isTest | ||
public class EDRD_cls_HandleGroupsTest { | ||
|
||
/** | ||
* @author: | ||
* @date: 23 Dec 2024 | ||
* @description: The purpose of this method is to cover Testcoverage of handleGroupMembership | ||
* @Modification Log: [Date] - [Change Reference] - [Changed By] - [Description] | ||
*/ | ||
@isTest | ||
public static void handleGroupMembershipTest(){ | ||
Account providerAcc = TestFactory.newProvider('Provider Test'); | ||
providerAcc.Committee__pc = ESA_cls_constants.EDRD_PERSONACCOUNT_SC; | ||
providerAcc.Committee_Name__pc = ESA_cls_constants.EDRD_PERSONACCOUNT_SC_METABOLIC_SUBCOMMITTEE; | ||
providerAcc.Provider_Identifier__pc = '1112223'; | ||
providerAcc.Provider_Type__pc = ESA_cls_constants.EDRD_PHYSICIAN; | ||
insert providerAcc; | ||
|
||
Id ContactId = [SELECT Id FROM Contact WHERE AccountID =: providerAcc.Id].get(0).Id; | ||
Profile profileRec = [SELECT Id FROM Profile WHERE Name = 'EDRD Prescriber Community User']; | ||
User communityUser = TestFactory.createCommunityUser(ContactId, profileRec.Id, 'Test1', 'Test'); | ||
insert communityUser; | ||
|
||
providerAcc.Committee__pc = ESA_cls_constants.EDRD_PERSONACCOUNT_ACSC; | ||
|
||
Test.startTest(); | ||
update providerAcc; | ||
Test.stopTest(); | ||
|
||
List<GroupMember> groupMembers = [SELECT Id, GroupId FROM GroupMember WHERE UserOrGroupId = :communityUser.Id]; | ||
|
||
Assert.areEqual(TRUE, groupMembers.size() > 0, 'At least one GroupMember should exist for the user'); | ||
Assert.areEqual(2, groupMembers.size(), 'Exactly two GroupMember should exist for the user'); | ||
Assert.areNotEqual(null, groupMembers[0].GroupId, 'GroupMember should have a valid GroupId'); | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
dev-app-post/main/default/classes/ESA_cls_accountTriggerHandlerTest.cls-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>60.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.