+ Start a Discussion
Adam ColtonAdam Colton 

Address object for testing

I need an instance of an Address() for testing, but the constructor takes no arguments. What is the best way to handle this?
Tim BarsottiTim Barsotti


Address is a compound field for Standard objects such as Accounts or Contacts. I would recommend you instantiate an Account or Contact with an address first, then you can utilize methods like getMailingAddress(). Here is the SOAP guide: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/compound_fields_address.htm