how to move apex class from developer edition to enterprice edition
i have apex class in developer edition and i want to move this class into enterprice edition using apex expolrer IDE but i am getting error like this "test coverage of selected apex trigger is 0 at least 1 % test coverage is required".The apex class is given below.so kindly let me know as soon as possible.
public class SendEmailToFeedback { public SendEmailToFeedback() {
}
public SendEmailToFeedback(ApexPages.StandardController controller)
{
}
public String items { get; set; }
Opportunity opportunity;
//public String subject{ get; set; }
//public String body { get; set; }
public String lid { get; set; }
public String response {get; set;}
List<Opportunity> Opp;
public PageReference cancel()
{
return null;
}
public List<Opportunity> getOpp()
{
if(Opp== null)
{
lid = System.currentPageReference().getParameters().get('id');
Opp= [Select o.Name,o.Email__c from 开发者_运维知识库Opportunity o where o.id =:lid];
}
return Opp;
}
public PageReference send()
{
Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
String addresses;
if (Opp[0].Email__c != null)
{
addresses = Opp[0].Email__c;
if (Opp[0].Email__c != null)
{
addresses += ':' + Opp[0].Email__C;
String[] toAddresses = addresses.split(':', 0);
email.setSenderDisplayName('THYLAKSOFT LLC');
// email.setSubject(subject);
email.setToAddresses(toAddresses);
email.setPlainTextBody('Click The Followoing Link http://tefllife.com/studentfeedback.html');
try
{
Messaging.SendEmailResult [] resultMail= Messaging.sendEmail(new
Messaging.SingleEmailMessage[] {email}); if(resultMail[0].isSuccess())
response = 'ok sent!'; else { response = resultMail[0].getErrors().get(0).getMessage(); } } catch(System.EmailException ex) { response = ex.getMessage(); } } }
return null;
}
}
You won't be able to deploy it without also providing the test classes for it, see the docs on apex testing
精彩评论