You need to sign in to do that
Don't have an account?
PRASENJIT BANERJEE 24
Can someone help me to write Test Class for aura enabled Apex class ??
public with sharing class AccountTeamMemberController
{
@AuraEnabled
public static list<Account_Team_Member__c> getRelatedList(Id recordId)
{
Apttus__APTS_Agreement__c objAgreement = [Select id , Apttus__Account__c from Apttus__APTS_Agreement__c where id =: recordId ];
List<Account_Team_Member__c> atmlist = [Select Name, Role__c, Active__c,Email__c from Account_Team_Member__c
where Account__c =: objAgreement.Apttus__Account__c AND Role__c ='Relationship Manager'];
return atmlist;
}
}
{
@AuraEnabled
public static list<Account_Team_Member__c> getRelatedList(Id recordId)
{
Apttus__APTS_Agreement__c objAgreement = [Select id , Apttus__Account__c from Apttus__APTS_Agreement__c where id =: recordId ];
List<Account_Team_Member__c> atmlist = [Select Name, Role__c, Active__c,Email__c from Account_Team_Member__c
where Account__c =: objAgreement.Apttus__Account__c AND Role__c ='Relationship Manager'];
return atmlist;
}
}
The test class can be something as below. You should give all the mandotaty fields in all the respective objects while creating them.
Let me know if you face any issues.
If this solution helps, Please mark it as best answer.
Thanks,