Esempio n. 1
0
        /// <summary>
        ///     Checks the Inner is not equal to
        /// </summary>
        /// <param name="expected">The expected.</param>
        /// <param name="message">The message.</param>
        /// <returns></returns>
        /// <exception cref="ObjectCheckFailure"></exception>
        protected override bool InnerIsNotEqualTo(T expected, string message = null)
        {
            var trace = new CheckingTrace();

            if (ObjectComparer.ObjectsAreEqual(_value, expected, PropertiesComparisonOptions.Default, trace))
            {
                // ReSharper disable once UnthrowableException
                throw _factory.Build(new ObjectCheckFailure(CheckType.NotEqual, _value, expected, trace, message));
            }
            return(true);
        }
 private static bool Compare <TTested, TExpected>(TTested tested, TExpected expected)
 {
     return(ObjectComparer.ObjectsAreEqual(tested, expected, PropertiesComparisonOptions.Default,
                                           new CheckingTrace()));
 }