Exemplo n.º 1
0
 /// <summary>
 /// Test whether the constraint is matched by the actual value.
 /// This is a template method, which calls the IsMatch method
 /// of the derived class.
 /// </summary>
 /// <param name="actual"></param>
 /// <returns></returns>
 protected override bool Matches(string actual)
 {
     if (_caseInsensitive)
     {
         return(actual != null && actual.ToLower().EndsWith(ExpectedValue.ToLower()));
     }
     else
     {
         return(actual != null && actual.EndsWith(ExpectedValue));
     }
 }