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

isNotSameAs

fun <T> Expect<T>.isNotSameAs(expected: T): Expect<T> (source)

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

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

fails {
    val list = listOf(3)
    expect(list).isNotSameAs(list)
}

Return
an Expect for the subject of this expectation.