Timeline for Test Code Coverage - Delete DML catch block
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 2, 2023 at 2:13 | comment | added | cropredy | @jojopogi - see my answer; a technique well worth learning to deal with situations like this. | |
Dec 1, 2023 at 22:00 | comment | added | jojopogi | @cropredy how do you provide a mock implementation of that class that throws an exception? | |
Dec 1, 2023 at 19:24 | comment | added | cropredy |
expedient but not best practice; better to move delete operation into a separate class and then at test time, provide a mock implementation of that class that throws an exception. Putting Test.isRunningTest into PROD code is a code smell
|
|
Dec 1, 2023 at 4:51 | history | answered | Tushar Jadav | CC BY-SA 4.0 |