Skip to content

Commit 351fd90

Browse files
committed
Addressed PR feedback, removed commented out lines entirely
1 parent 1fccc6b commit 351fd90

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

BarcodeParserBuilder.UnitTests/Barcodes/HIBC/HibcBarcodeParserBuilderTestFixture.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -494,14 +494,6 @@ public void InvalidBarcodeStringThrowsException(string barcode, string expectedM
494494
"+A123BJC5D6E71G+$$52001510X3+ ",
495495
$"Failed to parse HIBC Barcode :{Environment.NewLine}Link Character did not match: expected 'G' but got '+'."
496496
},
497-
498-
// Disabled this test because HIBC spec 2.3.2.4 says that Q should (not shall) be used with UOM of 9.
499-
// It does not explicitly forbid other UOM values with Q.
500-
//
501-
// Using Quantity /Q requires UnitOfMeasure of 9!
502-
//{
503-
// "+A99912341/$10X3/16D20111231/14D20200131/Q500R",
504-
// $"Failed to parse HIBC Barcode :{Environment.NewLine}Using Quantity /Q requires UnitOfMeasure of 9!"
505-
//},
497+
506498
};
507499
}

BarcodeParserBuilder/Barcodes/HIBC/HibcBarcodeParserBuilder.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,7 @@ protected static IList<string> BuildSegments(HibcBarcode? barcode)
292292

293293
break;
294294
case 'Q': // Quantity /Q as of Spec 2.6 version
295-
//if (barcode.UnitOfMeasure != 9)
296-
// throw new HIBCParseException($"Using Quantity /Q requires UnitOfMeasure of 9!");
295+
// HIBC 2.3.2.4 states that quantity should be used with UoM 9 but it is not strictly enforced
297296
segmentData = segmentData[1..];
298297
barcode.Quantity = int.Parse(segmentData);
299298
break;

0 commit comments

Comments
 (0)