RegexConstraint can test whether a string matches the pattern provided.
Inheritance: NUnit.Framework.Constraints.StringConstraint
Ejemplo n.º 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);
        }
Ejemplo n.º 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;
        }