예제 #1
0
        protected NBiConstraint InstantiateConstraint(ContainXml ctrXml)
        {
            NBi.NUnit.Member.ContainConstraint ctr = null;
            if (ctrXml.Query != null)
                ctr = new NBi.NUnit.Member.ContainConstraint(ctrXml.Query.GetCommand());
            else if (ctrXml.Members != null)
            {
                var disco = InstantiateMembersDiscovery(ctrXml.Members);
                ctr = new NBi.NUnit.Member.ContainConstraint(disco);
            }
            else if (ctrXml.GetItems().Count() == 1)
                ctr = new NBi.NUnit.Member.ContainConstraint(ctrXml.Caption);
            else
                ctr = new NBi.NUnit.Member.ContainConstraint(ctrXml.GetItems());

            //Ignore-case if requested
            if (ctrXml.IgnoreCase)
                ctr = ctr.IgnoreCase;

            //Exactly
            //if (ctrXml.Exactly)
                //ctr = ctr.Exactly;

            return ctr;
        }
예제 #2
0
        protected global::NUnit.Framework.Constraints.Constraint InstantiateConstraint(ContainXml ctrXml)
        {
            NBi.NUnit.Member.ContainConstraint ctr = null;
            if (ctrXml.Query != null)
            {
                ctr = new NBi.NUnit.Member.ContainConstraint(ctrXml.Query.GetCommand());
            }
            else if (ctrXml.GetItems().Count() == 1)
            {
                ctr = new NBi.NUnit.Member.ContainConstraint(ctrXml.Caption);
            }
            else
            {
                ctr = new NBi.NUnit.Member.ContainConstraint(ctrXml.GetItems());
            }

            //Ignore-case if requested
            if (ctrXml.IgnoreCase)
            {
                ctr = ctr.IgnoreCase;
            }

            //Exactly
            //if (ctrXml.Exactly)
            //ctr = ctr.Exactly;

            return(ctr);
        }
예제 #3
0
        protected NBiConstraint InstantiateConstraint(ContainXml ctrXml)
        {
            NBi.NUnit.Member.ContainConstraint ctr = null;
            if (ctrXml.Query != null)
            {
                ctr = new NBi.NUnit.Member.ContainConstraint(ctrXml.Query.GetCommand());
            }
            else if (ctrXml.Members != null)
            {
                var disco = InstantiateMembersDiscovery(ctrXml.Members);
                ctr = new NBi.NUnit.Member.ContainConstraint(disco);
            }
            else if (ctrXml.GetItems().Count() == 1)
            {
                ctr = new NBi.NUnit.Member.ContainConstraint(ctrXml.Caption);
            }
            else
            {
                ctr = new NBi.NUnit.Member.ContainConstraint(ctrXml.GetItems());
            }

            //Ignore-case if requested
            if (ctrXml.IgnoreCase)
            {
                ctr = ctr.IgnoreCase;
            }

            //Exactly
            //if (ctrXml.Exactly)
            //ctr = ctr.Exactly;

            return(ctr);
        }
예제 #4
0
        protected global::NUnit.Framework.Constraints.Constraint InstantiateConstraint(ContainXml ctrXml)
        {
            NBi.NUnit.Member.ContainConstraint ctr = null;
            if (ctrXml.Query != null)
                ctr = new NBi.NUnit.Member.ContainConstraint(ctrXml.Query.GetCommand());
            else if (ctrXml.GetItems().Count() == 1)
                ctr = new NBi.NUnit.Member.ContainConstraint(ctrXml.Caption);
            else
                ctr = new NBi.NUnit.Member.ContainConstraint(ctrXml.GetItems());

            //Ignore-case if requested
            if (ctrXml.IgnoreCase)
                ctr = ctr.IgnoreCase;

            //Exactly
            //if (ctrXml.Exactly)
                //ctr = ctr.Exactly;

            return ctr;
        }