AssignableToConstraint

Charlie Poole edited this page Jan 31, 2016 · 1 revision
Clone this wiki locally

AssignableToConstraint tests that one type is assignable to another

Constructor

AssignableToConstraint( Type )

Syntax

Is.AssignableTo( Type )
Is.AssignableTo<T>()

Examples of Use

Assert.That( "Hello", Is.AssignableTo(typeof(object)));
Assert.That( 5, Is.Not.AssignableTo(typeof(string)));