示例#1
0
 public static void That([DoesNotReturnIf(false)] bool condition)
 {
     Assume.That(condition, Is.True, null, null);
 }
示例#2
0
 public static void That([DoesNotReturnIf(false)] bool condition, Func <string?> getExceptionMessage)
 {
     Assume.That(condition, Is.True, getExceptionMessage);
 }
示例#3
0
 /// <summary>
 /// Apply a constraint to an actual value, succeeding if the constraint
 /// is satisfied and throwing an InconclusiveException on failure.
 /// </summary>
 /// <param name="expression">A Constraint expression to be applied</param>
 /// <param name="actual">The actual value to test</param>
 /// <param name="message">The message that will be displayed on failure</param>
 static public void That(object actual, IResolveConstraint expression, string message)
 {
     Assume.That(actual, expression, message, null);
 }
示例#4
0
 public static void That([DoesNotReturnIf(false)] bool condition, string?message, params object?[]?args)
 {
     Assume.That(condition, Is.True, message, args);
 }
示例#5
0
 public static void That <TActual>(TActual actual, IResolveConstraint expression)
 {
     Assume.That(actual, expression, null, null);
 }
示例#6
0
 /// <summary>
 /// Apply a constraint to a referenced boolean, succeeding if the constraint
 /// is satisfied and throwing an InconclusiveException on failure.
 /// </summary>
 /// <param name="constraint">A Constraint to be applied</param>
 /// <param name="actual">The actual value to test</param>
 static public void That(ref bool actual, IResolveConstraint constraint)
 {
     Assume.That(ref actual, constraint.Resolve(), null, null);
 }
示例#7
0
 /// <summary>
 /// Asserts that a condition is true. If the condition is false the
 /// method throws an <see cref="InconclusiveException"/>.
 /// </summary>
 /// <param name="condition">The evaluated condition</param>
 static public void That(bool condition)
 {
     Assume.That(condition, Is.True, null, null);
 }
示例#8
0
 public static void That(Func <bool> condition, Func <string?> getExceptionMessage)
 {
     Assume.That(condition.Invoke(), Is.True, getExceptionMessage);
 }
示例#9
0
 /// <summary>
 /// Asserts that a condition is true. If the condition is false the method throws
 /// an <see cref="InconclusiveException"/>.
 /// </summary>
 /// <param name="condition">The evaluated condition</param>
 /// <param name="message">The message to display if the condition is false</param>
 /// <param name="args">Arguments to be used in formatting the message</param>
 static public void That(bool condition, string message, params object[] args)
 {
     Assume.That(condition, Is.True, message, args);
 }
示例#10
0
 /// <summary>
 /// Asserts that a condition is true. If the condition is false the method throws
 /// an <see cref="InconclusiveException"/>.
 /// </summary>
 /// <param name="condition">The evaluated condition</param>
 /// <param name="message">The message to display if the condition is false</param>
 static public void That(bool condition, string message)
 {
     Assume.That(condition, Is.True, message, null);
 }
示例#11
0
 /// <summary>
 /// Apply a constraint to an actual value, succeeding if the constraint
 /// is satisfied and throwing an InconclusiveException on failure.
 /// </summary>
 /// <param name="expr">A Constraint expression to be applied</param>
 /// <param name="del">An ActualValueDelegate returning the value to be tested</param>
 /// <param name="message">The message that will be displayed on failure</param>
 static public void That(ActualValueDelegate del, IResolveConstraint expr, string message)
 {
     Assume.That(del, expr.Resolve(), message, null);
 }
示例#12
0
 /// <summary>
 /// Asserts that a condition is true. If the condition is false the method throws
 /// an <see cref="InconclusiveException"/>.
 /// </summary>
 /// <param name="condition">The evaluated condition</param>
 /// <param name="getExceptionMessage">A function to build the message included with the Exception</param>
 public static void That(bool condition, Func <string> getExceptionMessage)
 {
     Assume.That(condition, Is.True, getExceptionMessage);
 }
示例#13
0
 /// <summary>
 /// Apply a constraint to a referenced value, succeeding if the constraint
 /// is satisfied and throwing an InconclusiveException on failure.
 /// </summary>
 /// <param name="constraint">A Constraint to be applied</param>
 /// <param name="actual">The actual value to test</param>
 /// <param name="message">The message that will be displayed on failure</param>
 static public void That(ref bool actual, IResolveConstraint constraint, string message)
 {
     Assume.That(ref actual, constraint.Resolve(), message, null);
 }
示例#14
0
 public static void That(Func <bool> condition, string?message, params object?[]?args)
 {
     Assume.That(condition.Invoke(), Is.True, message, args);
 }
示例#15
0
 /// <summary>
 /// Apply a constraint to a referenced value, succeeding if the constraint
 /// is satisfied and throwing an InconclusiveException on failure.
 /// </summary>
 /// <param name="expression">A Constraint expression to be applied</param>
 /// <param name="actual">The actual value to test</param>
 static public void That <T>(ref T actual, IResolveConstraint expression)
 {
     Assume.That(ref actual, expression.Resolve(), null, null);
 }
示例#16
0
 public static void That(Func <bool> condition)
 {
     Assume.That(condition.Invoke(), Is.True, null, null);
 }
示例#17
0
 /// <summary>
 /// Apply a constraint to a referenced value, succeeding if the constraint
 /// is satisfied and throwing an InconclusiveException on failure.
 /// </summary>
 /// <param name="expression">A Constraint expression to be applied</param>
 /// <param name="actual">The actual value to test</param>
 /// <param name="message">The message that will be displayed on failure</param>
 static public void That <T>(ref T actual, IResolveConstraint expression, string message)
 {
     Assume.That(ref actual, expression.Resolve(), message, null);
 }
示例#18
0
 public static void That(TestDelegate code, IResolveConstraint constraint)
 {
     Assume.That((object)code, constraint);
 }
示例#19
0
 /// <summary>
 /// Apply a constraint to an actual value, succeeding if the constraint
 /// is satisfied and throwing an InconclusiveException on failure.
 /// </summary>
 /// <param name="expression">A Constraint expression to be applied</param>
 /// <param name="actual">The actual value to test</param>
 static public void That(object actual, IResolveConstraint expression)
 {
     Assume.That(actual, expression, null, null);
 }
示例#20
0
 public static void That <TActual>(ActualValueDelegate <TActual> del, IResolveConstraint expr)
 {
     Assume.That(del, expr.Resolve(), null, null);
 }
示例#21
0
 /// <summary>
 /// Asserts that a condition is true. If the condition is false the method throws
 /// an <see cref="InconclusiveException"/>.
 /// </summary>
 /// <param name="condition">A lambda that returns a Boolean</param>
 /// <param name="getExceptionMessage">A function to build the message included with the Exception</param>
 public static void That(Func <bool> condition, Func <ConstraintResult, string> getExceptionMessage)
 {
     Assume.That(condition.Invoke(), Is.True, getExceptionMessage);
 }