You need to sign in to do that
Don't have an account?
Sanchi9
Test Class for Custom lightning controller
Hi I need help in writing test class for a custom lightning controller. Posting the code here:
public with sharing class AccountRecordFormClass {
@AuraEnabled
public static user fetchUser(){
User oUser = [select id,Name, Email FROM User Where id =: userInfo.getUserId()];
system.debug(oUser);
return oUser;
}
@AuraEnabled
public static account fetchaddress(String accid){
Account acc = [select id, BillingStateCode, BillingCountryCode,BillingStreet,BillingCity,BillingPostalCode,Phone, FROM Account Where id =: accid];
return acc;
}
}
public with sharing class AccountRecordFormClass {
@AuraEnabled
public static user fetchUser(){
User oUser = [select id,Name, Email FROM User Where id =: userInfo.getUserId()];
system.debug(oUser);
return oUser;
}
@AuraEnabled
public static account fetchaddress(String accid){
Account acc = [select id, BillingStateCode, BillingCountryCode,BillingStreet,BillingCity,BillingPostalCode,Phone, FROM Account Where id =: accid];
return acc;
}
}
Try Below Test Class Please Mark It As Best Answer If It Helps
Thank you!