RegexConstraint can test whether a string matches the pattern provided.
Inheritance: NUnit.Framework.Constraints.StringConstraint
Beispiel #1
0
        protected virtual NUnitCtr.Constraint BuildInternalConstraint()
        {
            NUnitCtr.Constraint ctr = null;

            if (!string.IsNullOrEmpty(regex))
            {
                if (ctr != null)
                {
                    ctr = ctr.And.Matches(regex);
                }
                else
                {
                    ctr = new NUnitCtr.RegexConstraint(regex);
                }
            }

            return(ctr);
        }
Beispiel #2
0
        protected override NUnitCtr.Constraint BuildInternalConstraint()
        {
            NUnitCtr.Constraint ctr = null;

            if (!string.IsNullOrEmpty(regex))
            {
                if (ctr != null)
                    ctr = ctr.And.Matches(regex);
                else
                    ctr = new NUnitCtr.RegexConstraint(regex);
            }

            return ctr;
        }