IsNothing() public method

Verifies that the specified object is Nothing. The assertion fails if it is not Nothing.
public IsNothing ( object value, string message = null ) : void
value object The object to verify.
message string An optional message to display if the assertion fails.
return void
Esempio n. 1
0
        public void IsNothingShouldFailWithNonNullValue()
        {
            var assert = new AssertClass();
            assert.IsNothing(new object());

            Assert.AreEqual(TestOutcome.Failed, _args.Result.Outcome);
        }
Esempio n. 2
0
        public void IsNothingShouldSucceedWithNullValue()
        {
            var assert = new AssertClass();
            assert.IsNothing(null);

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