public static object LogHashCode(this object value) { string message = string.Format("{0} <{1}>", value.GetHashCode(), value.GetType().Name); AssertHelper.WriteLine(message); return(value); }
public static T LogHashCodes <T>(this T value, object value2) { string message = string.Format("{0} <{1}> {2} {3}<{4}>", value.GetHashCode(), value.GetType().Name, value.Equals(value2) ? "==" : "!=", value2.GetHashCode(), value2.GetType().Name); AssertHelper.WriteLine(message); return(value); }
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); }
public static MockTask Create() { var mockTask = new MockTask(); mockTask.MockAction = () => { mockTask.InvokeCount++; AssertHelper.WriteLine("task running at: " + DateTime.Now.ToString("yyyyMMdd HH:mm:ss:fff")); }; return(mockTask); }
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); }