Back to Nunit

ClassicAssert.IsNotInstanceOf

docs/articles/nunit/writing-tests/assertions/classic-assertions/Assert.IsNotInstanceOf.md

latest592 B
Original Source

ClassicAssert.IsNotInstanceOf

ClassicAssert.IsNotInstanceOf succeeds if the object provided as an actual value is not an instance of the expected type.

csharp
ClassicAssert.IsNotInstanceOf(Type expected, object actual);
ClassicAssert.IsNotInstanceOf(Type expected, object actual,
                       string message, params object[] params);
ClassicAssert.IsNotInstanceOf<T>(object actual);
ClassicAssert.IsNotInstanceOf<T>(object actual,
                          string message, params object[] params);

See Also