/// <summary>
 /// This methods get called when this Gherkin is watered.
 /// </summary>
 public override void OnWater(WaterEventArgs args)
 {
     if (args.AcidFree)
     {
         // The explicit mention of base is relevant for the test!
         base.Grow();
     }
     else
     {
         Console.WriteLine("Gerkin: I cannot grow on this water.");
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// This methods get called when this Gherkin is watered.
 /// </summary>
 public virtual void OnWater(WaterEventArgs args)
 {
     Grow();
 }