1using System.Collections.Generic;
4using Ctc.Palplus.Integration.Driver.Entities;
12 internal class MockConsumablesForCoffeeMakerDevice
16 public MockConsumablesForCoffeeMakerDevice(
MockDevice forDevice, CoffeeConsumableManager parentManager)
18 ForDevice = forDevice;
19 Pools =
new List<CoffeeIngredient>{
new Coffee(ForDevice, parentManager),
new Milk(ForDevice, parentManager),
new VeganCream(ForDevice, parentManager)};
22 private MockConsumablesForCoffeeMakerDevice(MockConsumablesForCoffeeMakerDevice copyFrom,
23 CoffeeConsumableManager parentManager)
25 ForDevice = copyFrom.ForDevice;
26 Pools =
new List<CoffeeIngredient>(copyFrom.Pools.Select(somePool => somePool.Clone(parentManager)));
29 internal class VeganCream : CoffeeIngredient
31 public const string Name =
"Soy Milk";
32 public VeganCream(
MockDevice forDevice, CoffeeConsumableManager parentManager) : base(
Name,forDevice,parentManager)
34 mPuddles.Add(
new CoffeeIngredientContainer(
this,Name,
"Soy Milk Package",
new Quantity(500,Units.MilliLiter),
new Quantity(450,Units.MilliLiter)));
38 internal class Milk : CoffeeIngredient
40 public const string Name =
"Milk";
41 public Milk(
MockDevice forDevice, CoffeeConsumableManager parentManager) : base(
Name, forDevice, parentManager)
43 mPuddles.Add(
new CoffeeIngredientContainer(
this, Name,
"Milk Bottle",
new Quantity(1, Units.Liter),
new Quantity(975, Units.MilliLiter)));
49 public const string Name =
"Coffee";
50 public Coffee(
MockDevice forDevice, CoffeeConsumableManager parentManager) : base(
Name, forDevice,parentManager)
52 mPuddles.Add(
new CoffeeIngredientContainer(
this,Name,
"Coffee Container",
new Quantity(250,Units.Gram),
new Quantity(225,Units.Gram)));
57 public IReadOnlyCollection<CoffeeIngredient> Pools {
get; }
59 public MockConsumablesForCoffeeMakerDevice Clone(CoffeeConsumableManager forManager)
61 return new MockConsumablesForCoffeeMakerDevice(
this, forManager);
A fake device. This namespace contains the fake device driver and auxiliary classes for settings,...
Information about the available consumables with a common name (like "Water" or "Liners")
readonly ObservableCollection< IConsumablePuddle > mPuddles
A chronos plugin implementation for a fake device. We pretend we are controlling a mixture of coffee ...