ExpectNot.toBeOfType

Succeeds if received is neither TExpected nor a sub-type of it. Throws a FailingExpectationError if received can be cast to TExpected.

Note: null is considered not to be a sub-type of any class or interface, so if null is received, the expectation always succeeds.

struct ExpectNot(TReceived)
void
toBeOfType
(
TExpected
)
()
if (
(
is(TExpected == class) ||
is(TExpected == interface)
)
&&
(
is(TReceived == class) ||
is(TReceived == interface)
)
)

Meta