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
tyler_jenningstyler_jennings 

Testing Apex Code based on UserInfo attributes

We have a requirement that a closed case should not be updatable by customer portal users, but still allow internal users to modify the case. 

I'm wondering how to test this since I must be able to switch the "current user" multiple times to assert all the different scenarios.  So far, It doesn't appear that this is possible. 

Secondly, am I going to have to jump through hoops to acheive 75% coverage in this case?