You need to sign in to do that
Don't have an account?
sfdc@isha.ax1814
Lightningcomponent Apexclass testclass - Urgent help
Hi Team,
I need help on testclass for below lightning componnet apex class.
Can anyone help me on this .
public class LightningTabComponentController {
/* Method to fetch the parameters used for framing the URL*/
@AuraEnabled
public static OpptyRelatedData getCustomsettingValue()
{
OpptyRelatedData returnrelateddata = new OpptyRelatedData ();
string cusseturl= SMX_URL__c.getInstance().SMX_URL__c;
returnrelateddata.SMX = cusseturl;
string cusseturl1 = SFDC_URL__c.getInstance().SFDC_URL__c;
returnrelateddata.SFDCURL = cusseturl1;
String username = UserInfo.getUsername();
returnrelateddata.username=username;
String sessionId = UserInfo.getsessionId();
returnrelateddata.sessionId=sessionId;
String npxaccview = SFDC_URL__c.getInstance().NPX_Account_View_Embed__c;
returnrelateddata.npxaccview=npxaccview;
String npxconview = SFDC_URL__c.getInstance().NPX_Contact_View_Embed__c;
returnrelateddata.npxconview=npxconview;
string urler = URL.getSalesforceBaseUrl().toExternalForm();
returnrelateddata.urler=urler;
system.debug('returnrelateddatareturn======>'+returnrelateddata);
return returnrelateddata;
}
public class OpptyRelatedData{
@AuraEnabled
Public string SMX{get;set;}
@auraEnabled
public string SFDCURL{get;set;}
@auraEnabled
public string username{get;set;}
@auraEnabled
public string sessionId{get;set;}
@auraEnabled
public string npxaccview{get;set;}
@auraEnabled
public string npxconview{get;set;}
@auraEnabled
public string urler{get;set;}
}
}
Regards,
Isha
I need help on testclass for below lightning componnet apex class.
Can anyone help me on this .
public class LightningTabComponentController {
/* Method to fetch the parameters used for framing the URL*/
@AuraEnabled
public static OpptyRelatedData getCustomsettingValue()
{
OpptyRelatedData returnrelateddata = new OpptyRelatedData ();
string cusseturl= SMX_URL__c.getInstance().SMX_URL__c;
returnrelateddata.SMX = cusseturl;
string cusseturl1 = SFDC_URL__c.getInstance().SFDC_URL__c;
returnrelateddata.SFDCURL = cusseturl1;
String username = UserInfo.getUsername();
returnrelateddata.username=username;
String sessionId = UserInfo.getsessionId();
returnrelateddata.sessionId=sessionId;
String npxaccview = SFDC_URL__c.getInstance().NPX_Account_View_Embed__c;
returnrelateddata.npxaccview=npxaccview;
String npxconview = SFDC_URL__c.getInstance().NPX_Contact_View_Embed__c;
returnrelateddata.npxconview=npxconview;
string urler = URL.getSalesforceBaseUrl().toExternalForm();
returnrelateddata.urler=urler;
system.debug('returnrelateddatareturn======>'+returnrelateddata);
return returnrelateddata;
}
public class OpptyRelatedData{
@AuraEnabled
Public string SMX{get;set;}
@auraEnabled
public string SFDCURL{get;set;}
@auraEnabled
public string username{get;set;}
@auraEnabled
public string sessionId{get;set;}
@auraEnabled
public string npxaccview{get;set;}
@auraEnabled
public string npxconview{get;set;}
@auraEnabled
public string urler{get;set;}
}
}
Regards,
Isha
Greetings to you!
Use the following code. It may helpful for you
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com