Skip to main content
I have List method in a controller class...and i am going to call this  Method  in Test class. But i am getting  Method does not exist or  Incorrect signature error ? can any one resolve this.

This is the method in Controller class :

 public List<Building_Owner__c> contactList {

        get {

            if (contactList == null) {

                contactList = [Select id,Name,Address_1__c,Address_2__c,City__c,Contractor_Branch_Location__c,Company_Company_Location12__c,Contractor_Company_Location__c,Country__c,Email_Address__c,First_Name__c,Last_Name__c,Phone_Number__c,Postal_Code__c,State__c,Time_Zone__c from Building_Owner__c];

            }

            return contactList;

        }

        set;

    }

Test Class :

LCBSBuildingOwnersController bc = new LCBSBuildingOwnersController();   // creating controller class

        bc.newBuildingOwner();

        bc.Order();

        bc.buidingCancel();

        bc.buidingSave();

        bc.getContractorCompanyLoc();   // this is the page reference method calling correct

         bc.contactlist();   // this is the List method (How to call this method)

 
5 Antworten
  1. 1. Apr. 2015, 10:35
    Hi Anvesh,

    This is not a method..it is a imply get set list which you have used...No need to cover it will automaatcially get covered..

    P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.

    Thanks,

    Sandeep

    Salesforce Certified Developer 
0/9000