You need to sign in to do that
Don't have an account?
Venkateswarlu P
Test class for Map
public class Map_Accounts {
public Map<Id,Account> accMap {set;get;}
public List<Account> accList {set;get;}
public Account a {set;get;}
// Constructor
public Map_Accounts(){
accMap = new Map<id,Account>();
accList=[Select Id, Name from Account limit 5];
accMap.putAll(accList);
for (Id idKeys : accMap.keySet()){
a = accMap.get(idKeys);
}
}
}
public Map<Id,Account> accMap {set;get;}
public List<Account> accList {set;get;}
public Account a {set;get;}
// Constructor
public Map_Accounts(){
accMap = new Map<id,Account>();
accList=[Select Id, Name from Account limit 5];
accMap.putAll(accList);
for (Id idKeys : accMap.keySet()){
a = accMap.get(idKeys);
}
}
}
Best Answer chosen by Venkateswarlu P
sfdcMonkey.com
Hi try below test class for 100% coverge
Thanks let us know if it helps you