These methods allow us to make assertions about the type of an object.
Assert.IsInstanceOfType( Type expected, object actual ); Assert.IsInstanceOfType( Type expected, object actual, string message ); Assert.IsInstanceOfType( Type expected, object actual, string message, params object[] parms ); Assert.IsNotInstanceOfType( Type expected, object actual ); Assert.IsNotInstanceOfType( Type expected, object actual, string message ); Assert.IsNotInstanceOfType( Type expected, object actual, string message, params object[] parms ); Assert.IsAssignableFrom( Type expected, object actual ); Assert.IsAssignableFrom( Type expected, object actual, string message ); Assert.IsAssignableFrom( Type expected, object actual, string message, params object[] parms ); Assert.IsNotAssignableFrom( Type expected, object actual ); Assert.IsNotAssignableFrom( Type expected, object actual, string message ); Assert.IsNotAssignableFrom( Type expected, object actual, string message, params object[] parms );
Assert.IsInstanceOf<T>( object actual ); Assert.IsInstanceOf<T>( object actual, string message ); Assert.IsInstanceOf<T>( object actual, string message, params object[] parms ); Assert.IsNotInstanceOf<T>( object actual ); Assert.IsNotInstanceOf<T>( object actual, string message ); Assert.IsNotInstanceOf<T>( object actual, string message, params object[] parms ); Assert.IsAssignableFrom<T>( object actual ); Assert.IsAssignableFrom<T>( object actual, string message ); Assert.IsAssignableFrom<T>( object actual, string message, params object[] parms ); Assert.IsNotAssignableFrom<T>( object actual ); Assert.IsNotAssignableFrom<T>( object actual, string message ); Assert.IsNotAssignableFrom<T>( object actual, string message, params object[] parms );