I'm looking to implement some of the ideas presented by Andrew Fawcett and his Apex Enterprise Patterns. Basic idea is to employ the design patterns that he documents very well, but not his fflib repository as it conflicts with many of the implementations we already have in place.
My question relates to the Domain base class SObjectDomain.cls
. I notice that with the base class he includes @IsTest
methods. I assume per my understanding of APEX documentation that those methods would in fact count against the overall code count since they are in a functional class.
- Is that correct?
- Also will those test run during deployment if they're not in a
@IsTest
class? - Is this a good practice? I've always figured this was an anti-pattern