I've been working to get one test to 100% coverage. I was having trouble with one statement. I do have data that tests both the null and not null branches.
Here's the statement I changed to get 100%.
ThingToAdd = (SR_ID == null) ? new ThingRequest__c() : [Select Name,First_Name__c,Last_Name__c,Start_Date__c,Thing_ID__c,Phone_Number__c From ScholarRequest__c where ID = :SR_ID];
Note: the "from" line of the SOQL query was highlighted in red as not covered before I made my change.
What did I do to get code coverate to 100% ? I did not change the syntax of the SOQL query at all. I know the answer already, but I think it's interesting enough to merit sharing.