function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Cloud-LingCloud-Ling 

Help with Apex Classes

on making Apex Classes,

 

  • Should @isTest always be private class?
Thanks,
C-L

 

Best Answer chosen by Admin (Salesforce Developers) 
Pradeep_NavatarPradeep_Navatar

@isTest is used to define a test class and it must be private. Since this class is used by salesforce to test your apex script, you can’t use it in another way. So no mean to define it public.

 

Hope this helps.

All Answers

Pradeep_NavatarPradeep_Navatar

@isTest is used to define a test class and it must be private. Since this class is used by salesforce to test your apex script, you can’t use it in another way. So no mean to define it public.

 

Hope this helps.

This was selected as the best answer
Cloud-LingCloud-Ling

Great. Thanks!

Cloud-LingCloud-Ling

Mr. Pradeep,

 

I have following question about Classes, well infact, in using XML, so you create XML in class, can you give show me sample codes using the XML?

 

Thanks,

C-L