using Centron.BusinessLogic.Sales.Receipts.Internal; using Centron.Interfaces; using Centron.Interfaces.Warehousing; namespace Centron.Tests.BL.Sales.Receipts.Internal; public class ReceiptBarcodeBLTest { [Theory] [InlineData(BarcodeState.InDeliveryList, true)] [InlineData(BarcodeState.InStock, false)] [InlineData(BarcodeState.LostAtStocktaking, false)] [InlineData(BarcodeState.ManuallyBookedOut, false)] public void ShouldUpdateBarcode_ForPickupList_OnlyAllowsBarcodeInDeliveryList(BarcodeState currentState, bool expected) { bool result = ReceiptBarcodeBL.ShouldUpdateBarcode(CentronObjectKindNumeric.PickupListClass, currentState); Assert.Equal(expected, result); } [Fact] public void ShouldUpdateBarcode_ForOtherReceiptKind_DoesNotRestrictBarcodeState() { bool result = ReceiptBarcodeBL.ShouldUpdateBarcode(CentronObjectKindNumeric.CreditVoucherClass, BarcodeState.ManuallyBookedOut); Assert.True(result); } }