Add constructors from base class, and tests to verify behavior. #102
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The fflib_SObjectSelector class has added the DataAccess enum, and a new constructor to set this parameter. The default behavior of fflib_SObjectSelector sets DataAccess=LEGACY which is used by the current constructors in ApplicationSObjectSelector. The ApplicationSObjectSelector default constructor also sets includeFieldSetFields=true, enforceCRUD=false, and enforceFLS=false.
This PR adds a constructor that takes a DataAccess parameter, and defaults includeFieldSetFields=true like the default constructor. It also adds a constructor that takes both the includeFieldSetFields and DataAccess parameters, matching the new fflib_SObjectSelector constructor.
A test method validating the default behavior (includeFieldSetFields=true, enforceCRUD=false, enforceFLS=false, dataAccess=LEGACY), and new constructor behavior (includeFieldSetFields=true, enforceCRUD=false, enforceFLS=false, dataAccess=USER/SYSTEM_MODE) was added. Constructors were added to the inner class to enable these validations.
This change is