Beispiel #1
0
 public static void That([DoesNotReturnIf(false)] bool condition)
 {
     Assume.That(condition, Is.True, null, null);
 }
Beispiel #2
0
 public static void That([DoesNotReturnIf(false)] bool condition, Func <string?> getExceptionMessage)
 {
     Assume.That(condition, Is.True, getExceptionMessage);
 }
Beispiel #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);
 }
Beispiel #4
0
 public static void That([DoesNotReturnIf(false)] bool condition, string?message, params object?[]?args)
 {
     Assume.That(condition, Is.True, message, args);
 }
Beispiel #5
0
 public static void That <TActual>(TActual actual, IResolveConstraint expression)
 {
     Assume.That(actual, expression, null, null);
 }
Beispiel #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);
 }
Beispiel #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);
 }
Beispiel #8
0
 public static void That(Func <bool> condition, Func <string?> getExceptionMessage)
 {
     Assume.That(condition.Invoke(), Is.True, getExceptionMessage);
 }
Beispiel #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);
 }
Beispiel #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);
 }
Beispiel #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);
 }
Beispiel #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);
 }
Beispiel #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);
 }
Beispiel #14
0
 public static void That(Func <bool> condition, string?message, params object?[]?args)
 {
     Assume.That(condition.Invoke(), Is.True, message, args);
 }
Beispiel #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);
 }
Beispiel #16
0
 public static void That(Func <bool> condition)
 {
     Assume.That(condition.Invoke(), Is.True, null, null);
 }
Beispiel #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);
 }
Beispiel #18
0
 public static void That(TestDelegate code, IResolveConstraint constraint)
 {
     Assume.That((object)code, constraint);
 }
Beispiel #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);
 }
Beispiel #20
0
 public static void That <TActual>(ActualValueDelegate <TActual> del, IResolveConstraint expr)
 {
     Assume.That(del, expr.Resolve(), null, null);
 }
Beispiel #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);
 }