コード例 #1
0
ファイル: MembersSubsetOfBuilder.cs プロジェクト: zyh329/nbi
        protected global::NUnit.Framework.Constraints.Constraint InstantiateConstraint(SubsetOfXml ctrXml)
        {
            NBi.NUnit.Member.SubsetOfConstraint ctr;
            if (ctrXml.Query != null)
                ctr = new NBi.NUnit.Member.SubsetOfConstraint(ctrXml.Query.GetCommand());
            else if (ctrXml.Members != null)
            {
                var disco = InstantiateMembersDiscovery(ctrXml.Members);
                ctr = new NBi.NUnit.Member.SubsetOfConstraint(disco);
            }
            else
                ctr = new NBi.NUnit.Member.SubsetOfConstraint(ctrXml.GetItems());

            //Ignore-case if requested
            if (ctrXml.IgnoreCase)
                ctr = ctr.IgnoreCase;
            return ctr;
        }
コード例 #2
0
ファイル: MembersSubsetOfBuilder.cs プロジェクト: zyh329/nbi
        protected global::NUnit.Framework.Constraints.Constraint InstantiateConstraint(SubsetOfXml ctrXml)
        {
            NBi.NUnit.Member.SubsetOfConstraint ctr;
            if (ctrXml.Query != null)
            {
                ctr = new NBi.NUnit.Member.SubsetOfConstraint(ctrXml.Query.GetCommand());
            }
            else if (ctrXml.Members != null)
            {
                var disco = InstantiateMembersDiscovery(ctrXml.Members);
                ctr = new NBi.NUnit.Member.SubsetOfConstraint(disco);
            }
            else
            {
                ctr = new NBi.NUnit.Member.SubsetOfConstraint(ctrXml.GetItems());
            }

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