You need to sign in to do that
Don't have an account?
Miranda L 2
How to cover these code in my test class
HI,
I need help to cover following code into my test class
I need help to cover following code into my test class
pcon
You need to craft a test case that meets the criteria. So you need to have a test method that returns the data that the SOQL query returns, data that fails your try statement, data that causes invoicesToUpdate to not be empty and oldInvoicesToUpdate to not be empty. Looking at the failed lines here (with the exception of the catch block) it appears that you're not testing your code in a meaningful way.