開発者は、テスト クラス内から組織データにアクセスしようとしています。テストクラスに (seeAllData=true) アノテーションが必要な sObject タイプはどれですか?
正解:B
Test (SeeAllData=true) annotation is used to grant test classes and individual test methods access to all data in the organization, including pre-existing data that the test didn't create. This annotation is required for Apex code saved using Salesforce API version 24.0 and later.
Profile is one of the sObject types that require the isTest (SeeAllData=true) annotation to access org data from within a test class. Other sObject types that require this annotation are User, UserRole, Group, GroupMember, QueueSobject, and CronTrigger.
Therefore, using Profile as the sObject type requires the test class to have the isTest (SeeAllData=true) annotation.