You need to sign in to do that
Don't have an account?
ramm12
Need help on apex test class
Hi ,
I have the below two list
Issue 1:
Public List<Opportunity> test{get;set;}
Public List<AggregateResult> test1{get;set;}
if(test.size()>0 && test1.size()==0)
{
//some code
}
Issue 2:
ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.INFO,'this is not valid.'));
How to write and cover the above two issues in apex test class??
I have the below two list
Issue 1:
Public List<Opportunity> test{get;set;}
Public List<AggregateResult> test1{get;set;}
if(test.size()>0 && test1.size()==0)
{
//some code
}
Issue 2:
ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.INFO,'this is not valid.'));
How to write and cover the above two issues in apex test class??
like you have a class A the create a Object of class A in test class and then access the list using ObjOfClassA.test.add(TempOpportunityRecordCreatedinTestClass)
and thenn call your method