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

Is there a specific reason as to why we generally declare a  test class as  'Private' ? e.g.  @isTest private class ParkLocatorTest { ​​​​​​​}

Best Answer chosen by R557
You declare it private so that no methods inside can be used from classes outside of itself.  You wouldn't want anyone accidentally using your test class methods inside of their production code.