Exemple #1
0
        public void Ausfuehren(Produkt produkt)
        {
            if (!_zustand.Erfasst) throw new NichtGefunden("Auftrag");
            if (_zustand.Erfuellt) return;

            if (!produkt.BestandPruefen(_zustand.Menge)) throw new VorgangNichtAusgefuehrt("Die Bestellung überschreitet den aktuellen Lagerbestand.");

            produkt.Ausliefern(_zustand.Menge);

            WurdeAusgefuehrt(_zustand.Produkt, _zustand.Menge);
        }