Timeline for Trying to get Code Coverage on my apex Class
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 2, 2016 at 18:20 | comment | added | Adrian Larson♦ | @LouisHM That critique was for D. Cruz, not yourself. | |
Aug 2, 2016 at 18:19 | comment | added | Louis HM | Will do @AdrianLarson. I will explain that moving forward from now on. What I was trying to send a user to a VFpage after they click on an email with a thumbs up or thumbs down. This is basically my Thumbs up Class and it will set the Saleforce record to 'Yes'. Basically my job is to record wether or not the end user is happy with our method of business workflow. So this class creates a Yes record and associates the original parent record. I then send them to another landing VFpage that says Thank You. | |
Aug 2, 2016 at 18:19 | comment | added | D. Cruz | You where not getting coverage because you where manually creating the Business_Intelligence_Survey__c instead of using the controller methods and variables. | |
Aug 2, 2016 at 18:15 | comment | added | Louis HM | Thanks @D. Cruz! I used SFDCFox's code and I got 78% code coverage. I'm all set here but I will def take a stab at yours too. You guys are awesome. I didn't think I would get an answer so fast from anyone. I appreciate you guys a ton. | |
Aug 2, 2016 at 18:15 | comment | added | D. Cruz | If you change SeeAllData to false, instead of hardcoding the BusIntId, you have to create the record and assign the id of the record created. | |
Aug 2, 2016 at 18:14 | comment | added | Adrian Larson♦ | Please don't just do a code dump. If code is worth the time to post, it should be worth the time to explain as well. | |
Aug 2, 2016 at 18:12 | history | answered | D. Cruz | CC BY-SA 3.0 |