Ejemplo n.º 1
0
        public static object LogHashCode(this object value)
        {
            string message = string.Format("{0} <{1}>", value.GetHashCode(), value.GetType().Name);

            AssertHelper.WriteLine(message);
            return(value);
        }
Ejemplo n.º 2
0
        public static object LogHashCodeWiths(this object value, object value2)
        {
            string message = string.Format("{0} <{1}> {2} {3}<{4}>", value.GetHashCode(), value.GetType().Name, value == value2 ? "==" : "!=", value2.GetHashCode(), value2.GetType().Name);

            AssertHelper.WriteLine(message);
            return(value);
        }
Ejemplo n.º 3
0
        public static object ShouldNotSame(this object value, object expectedValue)
        {
            if (value == null || expectedValue == null)
            {
                Assert.AreNotSame(expectedValue, value);
                return(value);
            }
            string message = string.Format("Should Not Same [{0}] => <{1}> : <{2}>", value.GetType().Name, value.GetHashCode(), expectedValue.GetHashCode());

            Assert.AreNotSame(expectedValue, value, message.WithKoPrefix());
            AssertHelper.WriteLine(message.WithOkPrefix());
            return(value);
        }