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 |
public void IsNotNothingShouldSucceedWithNonNullValue() { var assert = new AssertClass(); assert.IsNotNothing(new object()); Assert.AreEqual(TestOutcome.Succeeded, _args.Result.Outcome); }
public void IsNotNothingShouldFailWithNullValue() { var assert = new AssertClass(); assert.IsNotNothing(null); Assert.AreEqual(TestOutcome.Failed, _args.Result.Outcome); }