You need to sign in to do that
Don't have an account?
Phuc Nguyen 18
Test Class Error passing parameters to Class method
Trying to call a Class method from a test class:
Class UtilHelper
Test class
Error is Method does not exist or incorrect signature
Any suggesitons are appreciated
P
Class UtilHelper
global class FeeWrapper { global List<Project__c> transToUpdate; } public static FeeWrapper PassingRentFee(Fee_Calculation__c Config, Project__c trans, List<Project__c> transToUpdate, Map<String, Fee_Mapping__c> m_Fee)
Test class
Map<String,Fee_Mapping__c > afMap = new Map<String,Fee_Mapping__c >( [ SELECT Id, Fee_Amount__c , _Fee_Basis__c , WO__c,Group__c,Type__c,Macro_Type__c FROM Fee_Mapping__c]); List<Fee_Calculation__c > feeRec = [ SELECT Id, Name FROM Fee_Calculation__c]; List<Project__c> projectRec = [ SELECT Id, Name FROM Project__c] UtilHelper.PassingRentFee(feeRec[0],projectRec[0],projectRec[0],afMap);
Error is Method does not exist or incorrect signature
Any suggesitons are appreciated
P
UtilHelper.PassingRentFee(feeRec[0],projectRec[0],projectRec[0],afMap);
Your third parameter is a record of project , not a List<Project__c> as per the class List<Project__c> is required.
Please pass a list there
UtilHelper.PassingRentFee(feeRec[0],projectRec[0],projectRec,afMap);
Hope it was helpful, Please mark it as best answer so that it can help others.
Thanks!
All Answers
UtilHelper.PassingRentFee(feeRec[0],projectRec[0],projectRec[0],afMap);
Your third parameter is a record of project , not a List<Project__c> as per the class List<Project__c> is required.
Please pass a list there
UtilHelper.PassingRentFee(feeRec[0],projectRec[0],projectRec,afMap);
Hope it was helpful, Please mark it as best answer so that it can help others.
Thanks!
Hi,
correct code:
Thank You