3 个回答
Hi Jay Chandu,Try with below code.. you will get the 100% coverage.
If this helps, Please mark it as best answer.Thanks!!@istest
public class TestAccountRelatedlistController {
Static testmethod void TestAccountmethod1(){
List<Account> acclist = new list<Account>();
Account acc = new account();
acc.Name = 'test';
acc.phone = '8974990495';
acc.Email__c = 'test@ee.com';
acc.Description = 'test des';
//acclist.add(acc);
//insert acclist;
insert acc;
opportunity opp = new opportunity();
opp.Name = 'test';
opp.StageName='Qualification';
opp.CloseDate = system.today()+5;
opp.AccountId = acc.id;
insert opp;
List<AccountRelatedListController.DataTableWrapper> wrapperList = AccountRelatedListController.getAllOpps(acc.id);
}
}