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. |
Результат | void |
public void IsNothingShouldFailWithNonNullValue() { var assert = new AssertClass(); assert.IsNothing(new object()); Assert.AreEqual(TestOutcome.Failed, _args.Result.Outcome); }
public void IsNothingShouldSucceedWithNullValue() { var assert = new AssertClass(); assert.IsNothing(null); Assert.AreEqual(TestOutcome.Succeeded, _args.Result.Outcome); }