/// <summary>
		/// Create an appropriate <see cref="IPredicate"/> given an
		/// abitrary object.
		/// </summary>
		/// <param name="expectation">argument expectation</param>
		/// <returns><see cref="IPredicate"/> that is appropriate for
		/// the specified object</returns>
		public static IPredicate ConvertFrom(object expectation) 
		{
			IPredicate predicate = expectation as IPredicate;
			if ( predicate==null ) 
			{
				if ( expectation==null ) 
				{
					predicate = new IsAnything();
				}
				else 
				{
					predicate = new IsEqual(expectation);
				}
			}
			return predicate;
		}
		/// <summary>
		/// Default Constructor
		/// </summary>
		/// <param name="compare">Value to compare against</param>
		public IsEqualIgnoreCase(object compare)
		{
			_isEqual = new IsEqual(compare.ToString().ToLower(CultureInfo.CurrentCulture));
		}
Exemple #3
0
 /// <summary>
 /// Default Constructor
 /// </summary>
 /// <param name="compare">Value to compare against</param>
 public IsEqualIgnoreCase(object compare)
 {
     _isEqual = new IsEqual(compare.ToString().ToLower(CultureInfo.CurrentCulture));
 }