-3

I am unable to increase code coverage for getter and setter methods in test class. Please some one suggest how to increase code coverage for it.

I am having code:

get{
    lstAcct = [select Id,name from Account Limit :recordLimit OFFSET :offSetLimit ];
    return lstAcct;
}set;
     }

for this code it is showing in red color and pls some one help me out for increasing code coverage.

1
  • can you post your code here?
    – Bforce
    Commented Apr 22, 2014 at 5:23

1 Answer 1

0

In your test method add:

Account[] a = CONTROLLERNAME.PROPERTYNAME;
system.assertEquals(false,a.isEmpty()); //Or whatever it should be

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .