You need to sign in to do that
Don't have an account?
How to write a test classes for API classes
Below are 3 classes connected to each other. Help me to write a TEST CLASS.
public class IND_NeSLAgreementStatusRequest extends ParentAPIRequest{
public string Deal_No {get;set;}
public IND_NeSLAgreementStatusRequest(Applicant__c app,String loanAppId){
this.Deal_No = 'RJG01179D';//app.Opportunity__r.Parent_Deal_number__c;
validate(System.Label.NeSLAgreementStatus);
}
public override Map<String,String> getHttpRequestHeaders(){
Map<String,String> requestHeaderMap = Utilities.getHeaders();
return requestHeaderMap;
}
public override boolean validate(String serviceName){
if(this.Deal_No == null && String.isBlank(this.Deal_No)){
throw new IND_Exception(System.Label.deal_Number);
}
return true;
}
}
==========================
public class IND_NeSLAgreementStatusService {
public static IND_NeSLAgreementStatusRequest getNeSLAgreementStatusRequest(Applicant__c app,String loanAppId){
try{
IND_NeSLAgreementStatusRequest neSLAgreementStatusRequest = new IND_NeSLAgreementStatusRequest(app,loanAppId);//only validation and setting headers
return neSLAgreementStatusRequest;
}
catch(Exception ex){
ErrorLoggerUtil.logErrorEvent('IND_NeSLAgreementStatusRequest', 'getNeSLAgreementStatusRequest', System.Label.Apex, ex,loanAppId);
throw new IND_Exception(ex.getMessage());
}
}
}
=========================================================
public class IND_NeSLAgreementStatusResponse extends ParentAPIResponse {
public class Response {
public String status;
public String respDesc;
public List<Content> content;
}
public Response response;
public class Content {
public String Status_Code;
public String Status_Description;
public String Esign_Link;
}
}
The developer community recommends providing any attempts/code you've started, any errors you're getting, or where exactly you're struggling in achieving this while posting a question.
Thank you
Thanks for sharing this informative and amazing post here. I found it very interesting and enjoy reading this blog. Will wait for more posts.
https://tradeinvestoil.ru/product/virgin-fuel-d6
Hello everyone! I often come across a text where a preposition is misspelled, and I want to help you repeat and find out how well you know grammar! On this site you can learn a lot of new, interesting and useful things about the preposition. Come in and try it right now
https://www.prepositionfinder.com/how-to-check-sentences-with-prepositional-phrase-identifier/