State() public static method

Assert a bool expression, throwing InvalidOperationException if the expression is false.
if expression is false
public static State ( bool expression, string message ) : void
expression bool a boolean expression.
message string The exception message to use if the assertion fails
return void
 public void StateTrue()
 {
     Assert.Throws <InvalidOperationException>(() => AssertUtils.State(false, "foo"));
 }
Beispiel #2
0
 public void StateTrue()
 {
     AssertUtils.State(false, "foo");
 }