public void ValidatePotatoCooking(Potato potato) { if (potato == null) { throw new ArgumentNullException("Potato cannot be null"); } if (potato.HasBeenPeeled && potato.IsRotten) { throw new ArgumentException("Potato shouldn't be peeled and rotten"); } this.Cook(potato); }
private void Cook(Potato potato) { }