doc / ch.tutteli.atrium.api.infix.en_GB / isNotSameAs


infix fun <T> Expect<T>.isNotSameAs(expected: T): Expect<T> (source)
Deprecated: Use notToBeTheInstance; will be removed with 1.0.0 at the latest

Expects that the subject of this expectation is not the same instance as expected.

expect(listOf(2)) isNotSameAs listOf(2) // holds because isSameAs is based on identity, use notToBe for equality

fails {
    val list = listOf(3)
    expect(list) isNotSameAs list // fails because isNotSameAs is based on identity, use toBe for equality

an Expect for the subject of this expectation.