I have the following code in my solution :-
public async void ExecuteScan(string barcode)
{
if (string.IsNullOrEmpty(barcode))
{
barcode = await _scannerService.Scan();
}
ConsignmentReferenceCode = barcode;
}
I have tests that seem to cover this method however I can't seem to get 100% code coverage. The following line is highlighted as being partially covered :-
barcode = await _scannerService.Scan();
How might I address this to achieve 100% code coverage?