You need to sign in to do that
Don't have an account?
mansi
Test class urgent help!!
Hi can any one tell me how to cover the below code in the test class..
Class name is SaveOnEditAmexCampaignCtrlrExt
only first few lines of my below code are covered.. please tellme how to cover the whole method
Hi Mansi,
Do share the test method written by you so far... that will help pinpoint the issue...
here is the test method:
Hi,
First of all you will create the list of all of your wrapper classes first like this
list<accountWrapperList> accwrp=new list<accountWrapperList>();
similarly for others;
wrap.checkboxField=True;
wrap.SE='85991';
wrap.addressline1='A-3/8';
wrap.city='AFTON';
wrap.Name='Test';
wrap.Country='United States of America';
wrap.State='Alabama';
wrap.language='US English';
wrap.category='Dining';
wrap.subcategory='American';
wrap.addVerificationStatus = True;
Now write this accwrp.add(wrap);
similarly for others.
Fianly call that method with the instance of your class like this;
sc.fetchOffersForTheSelecetdMerchants();
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Hi the coverage has still not increased.. infact it decreased from 76% to 75%. please find my test class below
static testmethod void SaveOnEditAmexCampaignCtrlrExtTest(){
Hi,
There are some changes in above code:
Replace this mercwrap.Merchant='hello merchant';
With mercwrap.Merchant='test998';
Let me know if there any issue