2016-04-29 11 views
1

Wie schreibt man eine Testklasse für eine Klasse mit öffentlichen endgültigen statischen Strings in Salesforce? Ich versuchte mit system.assertequals scheint nicht richtig zu funktionieren.Testklasse für öffentliche statische Endloszeichenfolge

@isTest 
private class Test_TPET_Constants{ 

    private static testMethod void test() { 
     //TPET_Constants inst= new TPET_Constants(); 
     System.assertEquals(TPET_Constants.PICKLIST_COLLAB_SERVICE_SECURE_EMAIL,'Enterprise Secure Email'); 
     System.assertEquals(TPET_Constants.DRAFT_STATUS, 'Draft'); 
     System.assertEquals(TPET_Constants.ACTIVE_STATUS, 'Active'); 
     System.assertEquals(TPET_Constants.INACTIVE_STATUS, 'Inactive'); 
     System.assertEquals(TPET_Constants.SUBMITTED_STATUS, 'Submitted'); 
     System.assertEquals(TPET_Constants.REJECTED_STATUS , 'Rejected'); 
     System.assertEquals(TPET_Constants.PICKLIST_COLLAB_SERVICE , 'Collab Service'); 
     System.assertEquals(TPET_Constants.PENDING_IMPLEMENTATION_STATUS ,'Pending Implementation'); 
    } 

} 
+0

können Sie beschreiben, wie es nicht funktioniert? – superfell

Antwort

Verwandte Themen