IsNotNothing() публичный Метод

Verifies that the specified object is not Nothing. The assertion fails if it is Nothing.
public IsNotNothing ( object value, string message = null ) : void
value object The object to verify.
message string An optional message to display if the assertion fails.
Результат void
Пример #1
0
        public void IsNotNothingShouldSucceedWithNonNullValue()
        {
            var assert = new AssertClass();
            assert.IsNotNothing(new object());

            Assert.AreEqual(TestOutcome.Succeeded, _args.Result.Outcome);
        }
Пример #2
0
        public void IsNotNothingShouldFailWithNullValue()
        {
            var assert = new AssertClass();
            assert.IsNotNothing(null);

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