예제 #1
0
        /// <summary>
        /// Verify some rules as base test case
        /// </summary>
        /// <param name="requestElement">The request element (including: url, format, header)</param>
        /// <param name="expectedRuleList">To be verified rule list</param>
        /// <param name="negativeRuleDic">Those rules which have no such test data to be negative and its expected result</param>
        protected void VerifyRules_BaseTestCase(RequestElement requestElement, List <string> expectedRuleList, Dictionary <List <string>, string> negativeRuleDic = null)
        {
            if (requestElement == null || expectedRuleList == null)
            {
                Site.Assert.Inconclusive("The to be verified rule list is empty.");
                return;
            }

            var verifyAndNegativeRuleList = new List <ValidationElement>()
            {
                new ValidationElement(requestElement, expectedRuleList, negativeRuleDic)
            };

            this.VerifyRules_BaseTestCase(verifyAndNegativeRuleList);
        }
 public ValidationElement(RequestElement reqEle, List <string> passRules, Dictionary <List <string>, string> negativeRulesWithResultType = null)
 {
     this.requestEle      = reqEle;
     this.passRuleList    = passRules;
     this.negativeRuleDic = negativeRulesWithResultType;
 }
 public ValidationElement(RequestElement reqEle, List<string> passRules, Dictionary<List<string>, string> negativeRulesWithResultType = null)
 {
     this.requestEle = reqEle;
     this.passRuleList = passRules;
     this.negativeRuleDic = negativeRulesWithResultType;
 }
예제 #4
0
        /// <summary>
        /// Verify some rules as base test case
        /// </summary>
        /// <param name="requestElement">The request element (including: url, format, header)</param>
        /// <param name="expectedRuleList">To be verified rule list</param>
        /// <param name="negativeRuleDic">Those rules which have no such test data to be negative and its expected result</param>
        protected void VerifyRules_BaseTestCase(RequestElement requestElement, List<string> expectedRuleList, Dictionary<List<string>, string> negativeRuleDic = null)
        {
            if (requestElement == null || expectedRuleList == null)
            {
                Site.Assert.Inconclusive("The to be verified rule list is empty.");
                return;
            }

            var verifyAndNegativeRuleList = new List<ValidationElement>()
            {
                new ValidationElement(requestElement, expectedRuleList, negativeRuleDic)
            };

            this.VerifyRules_BaseTestCase(verifyAndNegativeRuleList);
        }