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
ifthikar Ahmed 1ifthikar Ahmed 1 

confused on selecting 3 option for the below question

User-added image
Khan AnasKhan Anas (Salesforce Developers) 
Hi Ifthikar,

Greetings to you!

Correct answers are:

A method annotated @istest (seealldata=false) in a class annotated @istest (seealladata=true) has access to all org data

Profiles are visible in a test even if a class is annotated @istest (seealldata=false)

A class containing test methods counts toward the apex code liit regardless of any @istest annotation

Please refer to the below links which might help you further.

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_isTest.htm

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_seealldata_using.htm

https://developer.salesforce.com/forums/?id=9060G0000005jHDQAY

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
Ajay K DubediAjay K Dubedi
Hi Ifthikar,


The correct answers to the above question are-
Options B, D and E

(B)-  A method annotated @istest (seealldata=false) in a class annotated @istest (seealladata=true)     has access to all org data

(D)- Profiles are visible in a test even if a class is annotated @istest (seealldata=false)

(E)- A class containing test methods counts toward the apex code liit regardless of any @istest      annotation

Refer this link for testing using seealldata-

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_seealldata_using.htm

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Ajay Dubedi
www.ajaydubedi.com   (http://www.ajaydubedi.com  )