I already have an if statement checking to see if Person Accounts are enabled in the org. So the test will only run if they are enabled. However Salesforce isn't accepting it because it has Accounts with FirstName, MiddleName and LastName fields being inserted.
I am working on a Managed Package that is used in both orgs that have Person Accounts and those that do not. So it has to be the same tests running for both situations.
Is there a workaround? For example with the RecordType query I turned the query into a String so the compiler doesn't recognize the isPersonAccount as a field. But there's no INSERT keyword in SOQL. Is there another workaround so my tests can run in both types of orgs, which is a requirement?