Exemple #1
0
        protected global::NUnit.Framework.Constraints.Constraint InstantiateConstraint(OrderedXml ctrXml)
        {
            var ctr = new NBi.NUnit.Member.OrderedConstraint();

            if (ctrXml.Descending)
            {
                ctr = ctr.Descending;
            }

            switch (ctrXml.Rule)
            {
            case OrderedXml.Order.Alphabetical:
                ctr = ctr.Alphabetical;
                break;

            case OrderedXml.Order.Chronological:
                ctr = ctr.Chronological;
                break;

            case OrderedXml.Order.Numerical:
                ctr = ctr.Numerical;
                break;

            case OrderedXml.Order.Specific:
                ctr = ctr.Specific(ctrXml.Definition);
                break;

            default:
                break;
            }

            return(ctr);
        }
Exemple #2
0
        protected global::NUnit.Framework.Constraints.Constraint InstantiateConstraint(OrderedXml ctrXml)
        {
            var ctr = new NBi.NUnit.Member.OrderedConstraint();
            if (ctrXml.Descending)
                ctr = ctr.Descending;

            switch (ctrXml.Rule)
            {
                case OrderedXml.Order.Alphabetical:
                    ctr = ctr.Alphabetical;
                    break;
                case OrderedXml.Order.Chronological:
                    ctr = ctr.Chronological;
                    break;
                case OrderedXml.Order.Numerical:
                    ctr = ctr.Numerical;
                    break;
                case OrderedXml.Order.Specific:
                    ctr = ctr.Specific(ctrXml.Definition);
                    break;
                default:
                    break;
            }

            return ctr;
        }
        protected NBiConstraint InstantiateConstraint(OrderedXml ctrXml)
        {
            var ctr = new NBi.NUnit.Member.OrderedConstraint();

            if (ctrXml.Descending)
            {
                ctr = ctr.Descending;
            }

            switch (ctrXml.Rule)
            {
            case OrderedXml.Order.Alphabetical:
                ctr = ctr.Alphabetical;
                break;

            case OrderedXml.Order.Chronological:
                ctr = ctr.Chronological;
                break;

            case OrderedXml.Order.Numerical:
                ctr = ctr.Numerical;
                break;

            case OrderedXml.Order.Specific:
                if (ctrXml.Query != null)
                {
                    ctr = ctr.Specific(BuildQuery(ctrXml.Query));
                }
                else
                {
                    ctr = ctr.Specific(ctrXml.Definition);
                }
                break;

            default:
                break;
            }

            return(ctr);
        }