Created
February 9, 2018 08:53
-
-
Save rsoesemann/fef3849265e033d34814edf941f0eaa1 to your computer and use it in GitHub Desktop.
How Custom Metadata should be usable in Apex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@IsTest | |
private class CustomMetadataInApex_Test { | |
@IsTest | |
private static void workLikeCustomObject() { | |
insert new ProductSetting__mdt(RelatedSObjectType__c = 'Account', DeveloperName = 'EnableFeature'); | |
System.assertEquals(1, [SELECT COUNT() FROM ProductSetting__mdt]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment