Below is the sample code :
public class ApexConstantsCls {
public static final INTEGER DEFAULT_SIZE= 3;
public static final STRING INITIAL_SUBMIT= 'Draft';
public static final STRING ERROR_MESSAGE = 'An error has occurred, please contact Admin.';
}
I tried with assert and defining a constructor as well but it didnt work. The first line which is an integer is getting covered though but not the other lines
Test Class:
@istest public class testtt {
static TestMethod void Product2Extension_UnitTest1(){
Test.startTest();
System.assertEquals(ApexConstantsCls.INITIAL_SUBMIT,'Draft');
test.stopTest();
}
}
Any help appreciated