You need to sign in to do that
Don't have an account?
Madevala Jithender
Kindly helpme out from this code to Test class
public class PropertyUtility {
public static void newListedProperties(){
List<Property__c> newproplist = new list<Property__c>();
newproplist = [select id,name,Broker__r.Email__c,Days_on_market__c from Property__c where Days_on_market__c<=30];
for(Property__c P:newproplist){
string propEmail = p.name + ':' + p.Broker__r.Email__c;
system.debug(propEmail);
}
}
}
public static void newListedProperties(){
List<Property__c> newproplist = new list<Property__c>();
newproplist = [select id,name,Broker__r.Email__c,Days_on_market__c from Property__c where Days_on_market__c<=30];
for(Property__c P:newproplist){
string propEmail = p.name + ':' + p.Broker__r.Email__c;
system.debug(propEmail);
}
}
}
try with below code.
If this helps, Please mark it as best answer.
Thanks!!
As per salesforce best practice we always use @testSetUp method for Insert All reacord on one place, So it's a good approach for each test class
if you need any assistanse, Please let me know!!
Kindly mark my solution as the best answer if it helps you.
Thanks
Mukesh