Exemplo n.º 1
0
 public void DecreaseStock(Drug drug, int decrease)
 {
     if (stockProvider.StockCount(drug) <= 0)
         throw new StockIsEmptyException();
     if (stockProvider.StockCount(drug) < decrease)
         throw new StockIsTooLowException();
     stockProvider.DecreaseStock(drug, decrease);
 }
Exemplo n.º 2
0
 public Prescription(DateTime expiry, IClock clock, Drug drug)
 {
     this.expiry = expiry;
     this.clock = clock;
 }
Exemplo n.º 3
0
 public int StockCount(Drug drug)
 {
     return stockProvider.StockCount(drug);
 }
Exemplo n.º 4
0
 public bool IsDrugInStock(Drug drug)
 {
     return stockProvider.StockCount(drug) > 0;
 }