ExactType Constraint
ExactTypeConstraint
tests that an object is an exact Type.
Constructor
ExactTypeConstraint(Type)
Syntax
Is.TypeOf(Type)
Is.TypeOf<T>()
Examples of Use
[Test]
public void TypeConstraint_Examples()
{
Assert.That("Hello", Is.TypeOf<string>());
Assert.That("Hello", Is.TypeOf(typeof(string)));
Assert.That("Hello", Is.InstanceOf<string>());
Assert.That("Hello", Is.InstanceOf<object>());
Assert.That("Hello", Is.AssignableTo<object>());
}