I am working on Challenge 6 of the Advanced APEX Specialist Superbadge, and I am stuck with the error message in the subject line. I have set up my TestFactory correctly, and I am doing an Assert in the verifyQuantityOrdered method that should work. I have refactored the Assert a few times, trying to find the "magic" version that they are looking for. Any guidance would be greatly appreciated.
답변 6개
Turns out I had to set a Decimal variable to the sum of the originalProduct.Quantity_Ordered__c and the qtyOrdered parameter, and then do an assertEquals between the updatedProduct.Quantity_Ordered__c and that variable. I have no idea why it had to be so specific.
Keiji, your links got me on the right track. Thank you for that.