示例#1
0
 public IEnumerable <WandItemResource> Build(IEnumerable <WandItem> wandItems)
 {
     return(wandItems?.Select(
                w => new WandItemResource
     {
         ConsignmentId = w.ConsignmentId,
         PartNumber = w.PartNumber,
         PartDescription = w.PartDescription,
         Quantity = w.Quantity,
         QuantityScanned = w.QuantityScanned,
         OrderNumber = w.OrderNumber,
         OrderLine = w.OrderLine,
         CountryCode = w.CountryCode,
         LinnBarCode = w.LinnBarCode,
         RequisitionNumber = w.RequisitionNumber,
         RequisitionLine = w.RequisitionLine,
         AllWanded = w.AllWanded == "Y",
         BoxesPerProduct = w.BoxesPerProduct,
         BoxesWanded =
             string.IsNullOrWhiteSpace(w.BoxesWanded) ? null : this.GetBoxesWanded(w.BoxesWanded),
         TypeOfSerialNumber = w.TypeOfSerialNumber,
         WandStringSuggestion = WandService.WandStringSuggestion(
             w.TypeOfSerialNumber,
             w.BoxesPerProduct,
             w.Quantity,
             w.LinnBarCode)
     }));
 }
 public void SetUp()
 {
     this.suggestedWandString = WandService.WandStringSuggestion("N", 3, 1, "12345");
 }