コード例 #1
0
ファイル: Program.cs プロジェクト: PeddleM/btw-samples
 public void TransferShipmentToCargoBay(string shipmentName, CarPart[] parts)
 {
     // CheckIfCargoBayHasFreeSpace(parts);
     // DoRealWork("unloading supplies...");
     // DoPaperWork("Signing the shipment acceptance form");
     // RecordThatSuppliesAreAvailableInCargoBay()
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: cduhard/btw-samples
 public void ShipSuppliesToCargoBay(string shipment, CarPart[] parts)
 {
 }
コード例 #3
0
ファイル: Program.cs プロジェクト: cduhard/btw-samples
            public void TransferShipmentToCargoBay(string shipmentName, CarPart[] parts)
            {
                Print("?> Command: transfer shipment to cargo bay");
                if (_ourListOfEmployeeNames.Count == 0)
                {
                    Fail(":> There has to be somebody at factory in order to accept shipment");
                    return;
                }

                if (_shipmentsWaitingToBeUnloaded.Count> 2)
                {
                    Fail(":> More than two shipments can't fit into this cargo bay :(");
                    return;
                }

                DoRealWork("opening cargo bay doors");
                RecordThat(new ShipmentTransferredToCargoBay()
                    {
                        ShipmentName = shipmentName,
                        CarParts = parts
                    });

                var totalCountOfParts = parts.Sum(p => p.Quantity);
                if (totalCountOfParts > 10)
                {
                    RecordThat(new CurseWordUttered
                        {
                            TheWord = "Boltov tebe v korobky peredach",
                            Meaning = "awe in the face of the amount of parts delivered"
                        });
                }
            }
コード例 #4
0
ファイル: Program.cs プロジェクト: cduhard/btw-samples
 public void TransferShipmentToCargoBay(string shipmentName, CarPart[] parts)
 {
 }