1

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?

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
Paul Diston
  • 3,279
  • 1
  • 17
  • 20
  • 1
    Perhaps this will help? http://stackoverflow.com/questions/15603813/code-coverage-for-async-methods – DavidG Oct 28 '14 at 10:47

0 Answers0