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
junkiyjunkiy 

test class about this class any one help

public class  customerUpdate {
public  void updatecustomer(){
        Set<Id> ParentIds = New Set<Id>();
        for(customer__c newissuer :(List< customer__c>) Trigger.New)
        {
            if(newissuer.Id != null)
                ParentIds.add(newissuer.Id);
        }
        List<customer__c> ParentList = [SELECT Id, Name,Status__c, RevQ0__c, RevQ1__c, RevQ2__c, RevQ3__c, RevQ4__c 
                                FROM customer__c where id =: ParentIds];
         For(customer__c CO : ParentList)    
        {
            system.debug('ParentList12'+co.id);
            system.debug('ParentList123'+co.Status__c);
            for(customer__c rc :(List<customer__c>) Trigger.New){
         if(rc.Status__c=='Approved'){
                   rc.RevQ1__c= CO.RevQ0__c;
                   rc.RevQ0__c = null;
                    rc.RevQ2__c= CO.RevQ1__c;
                    rc.RevQ3__c= CO.RevQ2__c;
                    rc.RevQ4__c= CO.RevQ3__c;
                    
                 
                }
            }
            
        }    
    }
    
}
Soyab HussainSoyab Hussain
Hi junkiy,
  
Use this code this will help you.

Apex Class:
@isTest
public class customerUpdateTest{
	@isTest	
	private static void testMethod1(){
		customer__c cstmer = new customer__c();
		cstmer.Status__c = 'Approved';
		insert cstmer;
	}
}
If you found it useful please appreciate my efforts and mark it as the best answer.

LinkedIn:  https://www.linkedin.com/in/soyab-hussain-b380b1194/

Regards,
Soyab