You need to sign in to do that
Don't have an account?
SIVA KUMAR 507
Hey All i need Apex test class for the below code please help me!!!
public with sharing class AskEddCaseInfo {
@AuraEnabled(Cacheable=true)
public static Map<String,Object> getInitData(){
Map<String,Object> returnMap = new Map<String,Object>();
Map<String, Object> categories = AskEDD_HomeCategoriesCtrl.fetchTitleNames();
Map<String, List<Map<String, String>>> subcategories =PickListUtility.getDependentPicklistOptions('Case','Sub_Category__c');
returnMap.put('categories',categories);
returnMap.put('subCategories',subcategories);
return returnMap;
}
// @AuraEnabled(Cacheable=true)
// public static List<Case> getTopic(String category,String subcategory){
// List<Case> topicList;
// if(category !='' && subcategory !=''){
// topicList = [Select Subject from Case where Category__c =:category and Sub_Category__c =:subcategory];
// }
// return topicList;
// }
}
@AuraEnabled(Cacheable=true)
public static Map<String,Object> getInitData(){
Map<String,Object> returnMap = new Map<String,Object>();
Map<String, Object> categories = AskEDD_HomeCategoriesCtrl.fetchTitleNames();
Map<String, List<Map<String, String>>> subcategories =PickListUtility.getDependentPicklistOptions('Case','Sub_Category__c');
returnMap.put('categories',categories);
returnMap.put('subCategories',subcategories);
return returnMap;
}
// @AuraEnabled(Cacheable=true)
// public static List<Case> getTopic(String category,String subcategory){
// List<Case> topicList;
// if(category !='' && subcategory !=''){
// topicList = [Select Subject from Case where Category__c =:category and Sub_Category__c =:subcategory];
// }
// return topicList;
// }
}
Hi Siva,
I think this is class Name "AskEDD_HomeCategoriesCtrl" and this is method "fetchTitleNames" similarly
PickListUtility.getDependentPicklistOptions('Case','Sub_Category__c');
You just need to satisfy this condition "Map<String, Object> categories" so insert those object which you are querying in this method "fetchTitleNames". and similarly for getDependentPicklistOptions.
You can take reference from the below code.
Please mark it as the Best Answer if your query is solved.
Thank You.
All Answers
Hi Siva,
I think this is class Name "AskEDD_HomeCategoriesCtrl" and this is method "fetchTitleNames" similarly
PickListUtility.getDependentPicklistOptions('Case','Sub_Category__c');
You just need to satisfy this condition "Map<String, Object> categories" so insert those object which you are querying in this method "fetchTitleNames". and similarly for getDependentPicklistOptions.
You can take reference from the below code.
Please mark it as the Best Answer if your query is solved.
Thank You.
Thanks for your reply.
i have another apex class i don't know to write test class can you help on that please?