Project Demo

Check out the gitHub project at:
http://github.com/SalesforceFoundation/ApexDoc
Show: global  public  webService  

TestUtil

Provides some reusable methods for test classes.

Properties

BHID
Provides a dummy Business Hours ID for testing.

Methods

  • assignPermissions
    Assigns a Permission Set to a User.
  • generateUser
    Generates a User record for testing.
  • getPermissions
    Provides a Permission Set record for testing, usually the CBA Admin Permissions.
  • getProfile
    Provides a Profile record for testing, usually the Standard User profile.

assignPermissions

Assigns a Permission Set to a User.
Parameters
permissionSetId
The permission set Id to use.
userId
The Id of the user being assigned the permission set.
Return Value
A Permission Set Assignment record.

generateUser

Generates a User record for testing.
Parameters
name
The name of the user.
p
The profile to assign to the user.
Return Value
A User record.

getPermissions

Provides a Permission Set record for testing, usually the CBA Admin Permissions.
Parameters
permissionSet
The name of the permission set to retrieve.
Return Value
A Permission Set record.

getProfile

Provides a Profile record for testing, usually the Standard User profile.
Parameters
profileName
The name of the profile to retrieve.
Return Value
A Profile record.

Powered By ApexDoc