Skip to content

Instantly share code, notes, and snippets.

@pcon
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pcon/e6d4fa40493270543fc0 to your computer and use it in GitHub Desktop.
Save pcon/e6d4fa40493270543fc0 to your computer and use it in GitHub Desktop.
Testing Strategy Code
public static String uppercase(String name) {
if (name == null) {
return 'NULL';
}
if (name.trim() == '') {
return 'BLANK';
}
return name.toUpperCase();
}
Trigger SkipStatusCalled on Lead (before insert, before update) {
for (Lead lead : Trigger.new) {
if (
lead.Called__c &&
lead.Status == 'Open - Not Contacted'
) {
lead.Status = 'Working - Contacted'
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment