You need to sign in to do that
Don't have an account?

Need help building a test class- not a developer
I have an Apex class I borrowed from the community, but I need help building a test class before I can deploy to production. Can someone help me? I plan on going through some tutorials, but I am in a time crunch to get this deployed.
Here is my Apex Class (it is short):
public class preChatRemoting_Con
{
public preChatRemoting_Con(ApexPages.StandardController controller)
{
}
@RemoteAction
public static contact getcontact(string contactemail)
{
Contact testContact=new Contact();
testContact=[Select Id,Name from Contact where email=:contactemail limit 1];
return testContact;
}
}
Here is my Apex Class (it is short):
public class preChatRemoting_Con
{
public preChatRemoting_Con(ApexPages.StandardController controller)
{
}
@RemoteAction
public static contact getcontact(string contactemail)
{
Contact testContact=new Contact();
testContact=[Select Id,Name from Contact where email=:contactemail limit 1];
return testContact;
}
}
Pls find below test class: