/// <summary>
 /// Initializes a new instance of the AlertRuleResource class.
 /// </summary>
 /// <param name="location">Resource location</param>
 /// <param name="alertRuleResourceName">the name of the alert
 /// rule.</param>
 /// <param name="isEnabled">the flag that indicates whether the alert
 /// rule is enabled.</param>
 /// <param name="id">Azure resource Id</param>
 /// <param name="name">Azure resource name</param>
 /// <param name="type">Azure resource type</param>
 /// <param name="tags">Resource tags</param>
 /// <param name="description">the description of the alert rule that
 /// will be included in the alert email.</param>
 /// <param name="condition">the condition that results in the alert
 /// rule being activated.</param>
 /// <param name="actions">the array of actions that are performed when
 /// the alert rule becomes active, and when an alert condition is
 /// resolved.</param>
 /// <param name="lastUpdatedTime">Last time the rule was updated in
 /// ISO8601 format.</param>
 public AlertRuleResource(string location, string alertRuleResourceName, bool isEnabled, string id = default(string), string name = default(string), string type = default(string), System.Collections.Generic.IDictionary <string, string> tags = default(System.Collections.Generic.IDictionary <string, string>), string description = default(string), RuleCondition condition = default(RuleCondition), System.Collections.Generic.IList <RuleAction> actions = default(System.Collections.Generic.IList <RuleAction>), System.DateTime?lastUpdatedTime = default(System.DateTime?))
     : base(location, id, name, type, tags)
 {
     AlertRuleResourceName = alertRuleResourceName;
     Description           = description;
     IsEnabled             = isEnabled;
     Condition             = condition;
     Actions         = actions;
     LastUpdatedTime = lastUpdatedTime;
 }
        private void AreEqual(RuleCondition exp, RuleCondition act)
        {
            if (exp is LocationThresholdRuleCondition)
            {
                var expRuleCondition = exp as LocationThresholdRuleCondition;
                var actRuleCondition = act as LocationThresholdRuleCondition;

                AreEqual(expRuleCondition.DataSource, actRuleCondition.DataSource);
                Assert.Equal(expRuleCondition.FailedLocationCount, actRuleCondition.FailedLocationCount);
                Assert.Equal(expRuleCondition.WindowSize, actRuleCondition.WindowSize);
            }
        }