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
prakher jain 10prakher jain 10 

Test class for retrieving apex class object

IM using this query List<ApexClass> classes = [select ApiVersion, Body, BodyCrc, CreatedById, CreatedDate, Id, IsValid, LastModifiedById, LastModifiedDate, LengthWithoutComments, Name, NamespacePrefix, Status, SystemModstamp from ApexClass LIMIT 10000];
to get all apex class in my org. I want to write test class for this but dont know how to cover this query can anyone help 
RituSharmaRituSharma
ApexClass is a metadata object, not a standard sObject. Your actual, deployed Apex classes are visible in test context by querying ApexClass object.