Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; MenuItem has a deprecated constructor in /home/charl422/nunitsoftware.com/nunitv2/php/build_menu.php on line 34
NUnit - TypeAsserts
NUnit 2.2.3 Legacy Documentation. View NUnit 3 Documentation

Type Asserts (NUnit 2.2.3)

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 );