public void Test001() { int x = 10; assert.Check(() => x == 10); // success assert.Check(() => x == 20); // failure }
public static void AreNotSame(this IAssertionTool tool, object expected, object actual, string msg, params object[] fmt) { tool.Check(() => expected, () => actual, (a, b) => !object.ReferenceEquals(a, b), null, msg, fmt); }
public static void Check(this IAssertionTool assertTool, Expression <Func <bool> > test, string msg) { assertTool.Check(test, null, "{0}", msg); }
public static void IsFalse(this IAssertionTool assertTool, Expression <Func <bool> > test) { test = Expression.Lambda <Func <bool> >(Expression.Not(test.Body)); assertTool.Check(test); }
public static void IsTrue(this IAssertionTool assertTool, Expression <Func <bool> > test, string msg) { assertTool.Check(test, msg); }
public static void AreNotEqual <T>(this IAssertionTool tool, T expected, Expression <Func <T> > actual) where T : class { tool.Check(() => expected, actual, (a, b) => !object.Equals(a, b)); }
public static void AreNotSame(this IAssertionTool tool, Expression <Func <object> > expected, Expression <Func <object> > actual, string msg, params object[] fmt) { tool.Check(expected, actual, (a, b) => !object.ReferenceEquals(a, b), null, msg, fmt); }
public static void AreSame(this IAssertionTool tool, Expression <Func <object> > expected, Expression <Func <object> > actual, string msg) { tool.Check(expected, actual, (a, b) => object.ReferenceEquals(a, b), null, "{0}", msg); }
public static void IsInstanceOf(this IAssertionTool assert, Type t, Expression <Func <object> > expr, string msg) { assert.Check(() => t, expr, (a, b) => a.IsAssignableFrom(b.GetType()), null, "{0}", msg); }
public static void IsInstanceOf <T>(this IAssertionTool assert, Expression <Func <object> > expr) { assert.Check(() => typeof(T), expr, (a, b) => a.IsAssignableFrom(b.GetType())); }
public static void IsNotNull <T>(this IAssertionTool assertTool, Expression <Func <T> > test, string msg, params object[] fmt) where T : class { assertTool.Check <T, T>(() => null, test, (expected, actual) => expected != actual, msg, fmt); }
public static void IsNotNull <T>(this IAssertionTool assertTool, Expression <Func <T> > test) where T : class { assertTool.Check <T, T>(() => null, test, (expected, actual) => expected != actual); }
public static void Check <T1, T2>(this IAssertionTool assertTool, Expression <Func <T1> > expected1, Expression <Func <T2> > actual1, Expression <Func <T1, T2, bool> > test, string msg, params object[] fmt) { assertTool.Check(expected1, actual1, test, null, msg, fmt); }
public static void Check <T1, T2>(this IAssertionTool assertTool, Expression <Func <T1> > expected1, Expression <Func <T2> > actual1, Expression <Func <T1, T2, bool> > test, string msg) { assertTool.Check(expected1, actual1, test, null, "{0}", msg); }
public static void Check <T1, T2>(this IAssertionTool assertTool, Expression <Func <T1> > expected1, Expression <Func <T2> > actual1, Expression <Func <T1, T2, bool> > test, Exception exc) { assertTool.Check(expected1, actual1, test, exc, null, null); }
public static void AreEqual <T>(this IAssertionTool tool, Expression <Func <T> > expected, T actual) where T : class { tool.Check(expected, () => actual, (a, b) => object.Equals(a, b)); }
public static void AreNotEqual <T>(this IAssertionTool tool, Expression <Func <T> > expected, Expression <Func <T> > actual, string msg) where T : class { tool.Check(expected, actual, (a, b) => !object.Equals(a, b), null, "{0}", msg); }
public static void IsNotInstanceOf(this IAssertionTool assert, Type t, Expression <Func <object> > expr) { assert.Check(() => t, expr, (a, b) => !a.IsAssignableFrom(b.GetType())); }
public static void AreNotSame(this IAssertionTool tool, Expression <Func <object> > expected, Expression <Func <object> > actual) { tool.Check(expected, actual, (a, b) => !object.ReferenceEquals(a, b)); }
public static void IsNotInstanceOf(this IAssertionTool assert, Type t, Expression <Func <object> > expr, string msg, params object[] args) { assert.Check(() => t, expr, (a, b) => !a.IsAssignableFrom(b.GetType()), null, msg, args); }
public static void AreEqual <T>(this IAssertionTool tool, T expected, Expression <Func <T> > actual, string msg, params object[] fmt) where T : class { tool.Check(() => expected, actual, (a, b) => object.Equals(a, b), null, msg, fmt); }
public static void AreEqual <T>(this IAssertionTool tool, T expected, T actual, string msg) where T : class { tool.Check(() => expected, () => actual, (a, b) => object.Equals(a, b), null, "{0}", msg); }
public static void AreNotEqual <T>(this IAssertionTool tool, T expected, T actual, string msg, params object[] fmt) where T : class { tool.Check(() => expected, () => actual, (a, b) => !object.Equals(a, b), null, msg, fmt); }
public static void AreSame(this IAssertionTool tool, object expected, object actual, string msg) { tool.Check(() => expected, () => actual, (a, b) => object.ReferenceEquals(a, b), null, "{0}", msg); }
public static void IsTrue(this IAssertionTool assertTool, Expression <Func <bool> > test, string msg, params object[] fmt) { assertTool.Check(test, msg, fmt); }
public static void AreNotSame(this IAssertionTool tool, object expected, object actual) { tool.Check(() => expected, () => actual, (a, b) => !object.ReferenceEquals(a, b)); }
public static void IsFalse(this IAssertionTool assertTool, Expression <Func <bool> > test, string msg, params object[] fmt) { test = Expression.Lambda <Func <bool> >(Expression.Not(test.Body)); assertTool.Check(test, msg, fmt); }
public static void Check(this IAssertionTool assertTool, Expression <Func <bool> > test, Exception exc) { assertTool.Check(test, exc, null); }