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
Michele ToscanoMichele Toscano 

Increasing code coverage for my test class

How can I be sure to cover the following lines of code in my apex test class?  It's basically a method which is called to populateData ()  
Could someone provide a code sample which would cover these lines? Many thanks!
         
            Account acc = listacc[0];
            samObj.Planning_Account__c= acc.ParentId;
            samObj.Customer_Group__c= acc.Customer_Group_Description__c;
            samObj.CABOT_Segment__c= acc.CABOT_Segment__c;
            samObj.Account_Manager__c= acc.OwnerId;
            samObj.Technical_Manager__c= acc.Technical_Service_Manager__c;
            samObj.Ship_To_Address_Line_1__c= acc.Address_Line_1__c;
            samObj.Ship_To_Address_Line_2__c= acc.Address_Line_2__c;
            samObj.Ship_To_Address_Line_3__c= acc.Address_Line_3__c;
            samObj.Ship_To_Address_Line_4__c= acc.Address_Line_4__c;
            samObj.Account_Region__c= acc.Sub_Region__c;
            samObj.Ship_To_Country__c= acc.Country__c;
            samObj.Ship_To_State__c= acc.State__c;
            samObj.Ship_To_City__c= acc.City__c;
            samObj.Ship_To_Postal_Code__c= acc.Postal_Code__c;
          
Laraib_JafriLaraib_Jafri
Can you post your full class/trigger?