function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kiran ChodavadiyaKiran Chodavadiya 

Method does not exist or incorrect signature: void assertEqual(Integer, Decimal) from the type System

Hello,
I am facing this error while creating Test Class on Line No-25
What is solution or reson behind it ?
if anyone know how to solve this error, please share your knowledge.

Thank You.
@isTest
public class TestApexHourTrigger {
        
        @isTest
        Static Void test(){
    	Invoice__c inv = new invoice__c();
        inv.Name = 'Test Invoice';
        insert inv;
        
        Invoice_Line_Up__c invlnup = new Invoice_Line_Up__c();
        invlnup.Name = 'Part 1';
        invlnup.Price__c = 500;
        invlnup.Invoice_Name__c = inv.Id;
        insert invlnup;
        
        Invoice_Line_Up__c invlnup2 = new Invoice_Line_Up__c();
        invlnup2.Name = 'Part 2';
        invlnup2.Price__c = 5000;
        invlnup2.Invoice_Name__c = inv.Id;
        insert invlnup2;
        
        Invoice__c verify = [select Total_Amount__c From Invoice__c where id =:inv.Id];
        
        System.debug('List======>'+verify);
        system.assertEqual(5500,verify.Total_Amount__c);
    }
    
}


 
Best Answer chosen by Kiran Chodavadiya
SwethaSwetha (Salesforce Developers) 
HI Kiran,
Replace system.assertEqual with system.assertEquals and see if it fixes the issue.

See the list of supported "system methods" in salesforce. system.assertEqual does not exist
 https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_system.htm

Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you

All Answers

SwethaSwetha (Salesforce Developers) 
HI Kiran,
Replace system.assertEqual with system.assertEquals and see if it fixes the issue.

See the list of supported "system methods" in salesforce. system.assertEqual does not exist
 https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_system.htm

Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you
This was selected as the best answer
Kiran ChodavadiyaKiran Chodavadiya
Thanks Swetha.
it works.