IsFalse() public method

Verifies that the specified condition is false. The assertion fails if the condition is true.
public IsFalse ( bool condition, string message = null ) : void
condition bool Any Boolean value or expression.
message string An optional message to display if the assertion fails.
return void
Exemplo n.º 1
0
        public void IsFalseFailsWithTrueExpression()
        {
            var assert = new AssertClass();
            assert.IsFalse(true);

            Assert.AreEqual(TestOutcome.Failed, _args.Result.Outcome);
        }
Exemplo n.º 2
0
        public void IsFalseSucceedsWithFalseExpression()
        {
            var assert = new AssertClass();
            assert.IsFalse(false);

            Assert.AreEqual(TestOutcome.Succeeded, _args.Result.Outcome);
        }