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
Poonam Agarwal 7Poonam Agarwal 7 

Advance Apex Specialist Step 8 - test coverage of Constants class....it shows 62%

Hi, I am facing issue with test coverage of Constants class....it shows 62%......It should automatically be covered by testing other classes except for  this line of code because it  cannot be executed in testing context--->
 else {
            if (stdPriceBook == null) 
                stdPriceBook    = [select id, name from Pricebook2 where isStandard = true limit 1];
               STANDARD_PRICEBOOK_ID = (stdPriceBook!=null)?stdPriceBook.id:'';
        }
Below is the coverage shown...it is not showing blue for other lines nor it is showing red-----Any help would be appreciated

User-added image