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
Gilberto CharpentierGilberto Charpentier 

APEX TEST Challengue - I cannot figure it

Hi everyone! I am having a challenge with an apex test class.

Here is the issue: 
Issue
Here EquipmentTrigger_SVE line 14:
EquipmentTrigger_SVE line 14Here EquipmentTrigger_SVE_TST line 7
EquipmentTrigger_SVE_TST line 7Any help will be highly appreciated! 
Gilberto
Prateek Prasoon 25Prateek Prasoon 25
@isTest
private static void copyAccount_TST(){
   Account acc = new Account();
   acc.Name = 'Test Account';
   //add all required field for account
   acc.requriedFIeldAPIName = value(according to data type of this field ); //and same goes for other field .  
   insert acc;
   Equipment__c eq = new Equipment__c();
   eq.AccountERP__c = acc.Id;
   //add all required field for Equipment__c 
   eq.requriedFIeldAPIName = value(according to data type of this field ); //and same goes for other field .  
   insert eq;
   list<Equipment__c> equipmentList = [select Id,AccountERP__c,Account__c from Equipment__c];
   Test.startTest();
    EquipmentTrigger_SVE.copyAccount(equipmentList);
   Test.stopTest();
}

If you find my answer, please mark it as the best answer. Thanks!