Exemplo n.º 1
0
        private static bool Equals(AnyValueMatcher <T> obj1, AnyValueMatcher <T> obj2)
        {
            if (Object.Equals(null, obj1) ||
                Object.Equals(null, obj2) ||
                obj1.GetType() != obj2.GetType())
            {
                return(false);
            }

            // If both are non-null and they have the same type,
            // they match essentially any value of the same type,
            // so they are equal.
            return(true);
        }
Exemplo n.º 2
0
 static AnyValueMatcher()
 {
     Instance = new AnyValueMatcher <T>();
 }
Exemplo n.º 3
0
 public override bool Equals(object obj)
 {
     return(AnyValueMatcher <T> .Equals(this, obj as AnyValueMatcher <T>));
 }