Archives

Force.com Unit Testing Best Practice

Test classes should use the @isTest annotation Test methods setup() creates all data needed for a method and does not rely on current data in Org public static List<Asset> setup(Decimal assetAssetInstanceNumber, String productName)     { Product2 productId = new Product2(Name=productName); insert productId;         Account account = new Account(Name = ‘[TEST] Account […]

Rate this:

Read More