You need to sign in to do that
Don't have an account?
anvesh@force.com
How to include this piece of code in Test class ?
I want to write Test class for below controller class code. Pleease help me how to write in Test Class.
tList;
}
set;
}
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 contac
tList;
}
set;
}
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 contac
Create few records of Building_Owner__c and then call the method.
Please mark this as solution if this solves your problem, So that if anyone has this issue this can help.
If this is only the piece of code then you can just call this method but if this contactList is being used further then you should have data creation before calling it.
Thanks
Sandeep Singhal
buildingOwner.contactlist();