Skip to content

Conversation

@admillican08
Copy link
Collaborator

Added realistic phone numbers and real mailing cities, mailing states, postal codes, and mailing countries so as not to cause issues within orgs that have State and Country picklists enabled and for any orgs where there may be checks on realistic phone numbers, zip codes, and cities. Done at request of Warren Walters, as whenever I tried to deploy student's code to my own dev environment, I had to edit the test class and the mock class first to replace the phony state and country names.

…mailing cities, mailing states, and mailing countries so as not to cause issues within orgs that have State and Country picklists enabled and any orgs where there may be checks on realistic phone numbers and cities.
@admillican08 admillican08 requested a review from walters954 June 18, 2025 15:10
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

1 similar comment
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

*/
public with sharing class DummyJSONCalloutMockGenerator implements HttpCalloutMock {
public static String DUMMY_JSON_USER_PAYLOAD = '{"id": 1, "firstName":"Johnny", "lastName":"Test", "email": "[email protected]", "phone": "+123456789", "birthDate": "1990-01-01", "address": {"address": "123 Test St", "city": "Test City", "postalCode": "12345", "state": "TS", "country": "Testland"}}';
public static String DUMMY_JSON_USER_PAYLOAD = '{"id": 1, "firstName":"Johnny", "lastName":"Test", "email": "[email protected]", "phone": "15183425678", "birthDate": "1990-01-01", "address": {"address": "123 Test St", "city": "Schenectady", "postalCode": "12345", "state": "New York", "country": "United States"}}';

Check failure

Code scanning / PMD

Configurable naming conventions for field declarations. This rule reports variable declarations which do not match the regex that applies to their specific kind ---e.g. constants (static final), static field, final field. Each regex can be configured through properties. By default this rule uses the standard Apex naming convention (Camel case). Error

The static field name 'DUMMY_JSON_USER_PAYLOAD' doesn't match '[a-z][a-zA-Z0-9]*'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants