We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
#IsInstanceOf
Matches if an item is an instance of a specified type (using Type.IsInstanceOfType):
[Test] public void IsInstanceOf() { var isAnOrange = new IsInstanceOf<Orange>(); Assert.That(new Orange(), isAnOrange); // or alternatively Assert.That(new Orange(), Is.InstanceOf(typeof(Fruit))); } public class Fruit { } public class Orange : Fruit { }