My Apex Class:
@AuraEnabled
public static QCT_Claim__c getClaimInfo(Id claimId){
return [select Id, Claim_Status__c, Requested_amount__c, Amount_type__c, Treated_amount__c, Gap__c, Accept_Gap__c
from QCT_Claim__c
where Id = :claimId
limit 1];
return null;
}
My Test Class code for the return null:
static testMethod void getClaimInfo_Test_Null(){
Test.startTest();
QCT_Claim__c testClaim = QCT_NoteInfoCtrl.getClaimInfo(null);
Test.stopTest();
System.assertEquals(null, testClaim);
}
How to test for the return null? Doing it this way is getting me the error: list has no rows for assignment to sObject.