My Test class not covering all the code in this class plz help me to resolve this
Here it is my Class
public class emailCon1 {
public map<string,string> m{set;get;}
public list<contact> con{set;get;}
public emailCon1()
{
m=new map<string,string>();
con=[select lastname,email from contact];
for(contact c:con)
{
m.put(c.email,c.lastname);
}
}
}
It is my Test Class
@isTest
public class emailCon1_Tc
{
static testMethod void testMthd()
{
map<string,string> m=new map<string,string>();
contact c=new contact();
emailCon1 ec1=new emailCon1();
c.lastname='YYY';
c.email='[email protected]';
m.put(c.email,c.lastname);
}
}