fun <T> Expect<T>.notToBe(expected: T): Expect<T>
Expects that the subject of the assertion is not (equal to) expected.
expect(2).notToBe(3)
fails {
expect(12).notToBe(12)
}
expect(listOf(2)).notToBe(listOf(3))
fails {
expect(listOf(2)).notToBe(listOf(2))
}
AssertionError
- Might throw an AssertionError if the assertion made is not correct.
Return
An Expect for the current subject of the assertion.