Skip to content

ExactTypeConstraint

Charlie Poole edited this page Jan 31, 2016 · 5 revisions

ExactTypeConstraint tests that an object is an exact Type.

Constructor

ExactTypeConstraint( Type )

Syntax

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

Examples of Use

Assert.That("Hello", Is.TypeOf(typeof(string)));
Assert.That("Hello", Is.Not.TypeOf(typeof(int)));

Assert.That("World", Is.TypeOf<string>();
Clone this wiki locally