Skip to content

ObjectAssertions<TSelf, T>.NotBeTheSameInstanceAs Method ​

Definition ​

Asserts that the value is not the same instance as the expected value.

c#
public AssertionsChain<TSelf, T> NotBeTheSameInstanceAs(T? expected);

View source

Parameters ​

NameTypeDescription
expectedTThe instance that is not expected.

Returns ​

AssertionsChain<TSelf, T>

An AssertionsChain<TAssertions, T> for chaining further assertions.