File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ @isTest
2+ public with sharing class RelatedList_Test {
3+ @IsTest
4+ static void getRecords_Test (){
5+
6+ Test .startTest ();
7+ User testUser = [Select id from user where id = :UserInfo .getUserId ()];
8+ System .runAs (testUser ){
9+ RelatedList .getRecords (' Select id from contact limit 10' );
10+ }
11+ Test .stopTest ();
12+
13+ }
14+
15+ @IsTest
16+ static void countRecords_Test (){
17+ User testUser = [Select id from user where id = :UserInfo .getUserId ()];
18+ Test .startTest ();
19+ System .runAs (testUser ){
20+ RelatedList .countRecords (' Contact' );
21+ RelatedList .countRecords (null );
22+ }
23+ Test .stopTest ();
24+
25+ }
26+ }
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <ApexClass xmlns =" http://soap.sforce.com/2006/04/metadata" >
3+ <apiVersion >48.0</apiVersion >
4+ <status >Active</status >
5+ </ApexClass >
You can’t perform that action at this time.
0 commit comments