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

isNotSameAs

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

Expects that the subject of the assertion 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)
 }

Exceptions

AssertionError - Might throw an AssertionError if the assertion made is not correct.

Return
An Expect for the current subject of the assertion.