Join the Conversation

2 Comments

  1. Great solution!
    I have one question though. I develop a Managed Package, and in order to generate the package, all included Apex classes/triggers must pass the required percentage of test coverage. My development org doesn’t currently have Person Accounts enabled, so any triggers on the Account object can’t really be tested. Do you think using you’re method would help pass test coverage, since more of the code is shared with the testable Contact trigger?

    1. You can probably improve your test coverage by doing such a refactoring but it still won’t cover the code for Person Account logic. To get better coverage, why not turn on “Person Account” feature for your development org?

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: