This Gist shows code examples for Apex Testing Best Practices. It relys on having the TestFactory in your org.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page standardController="Opportunity" | |
extensions="OpportunityNewDispatcherController" | |
action="{!redirect}"> | |
</apex:page> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// from http://wiki.developerforce.com/page/Apex_Design_Patterns_-_Singleton | |
// What makes this a singleton pattern? Is it that it uses a private constructor? | |
public class AccountFooRecordType { | |
// private static variable referencing the class | |
private static AccountFooRecordType instance = null; | |
public String id {get;private set;} // the id of the record type | |
// The constructor is private and initializes the id of the record type | |
private AccountFooRecordType(){ |
NewerOlder