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

notToBe

infix fun <T> Expect<T>.notToBe(expected: T): Expect<T> (source)

Expects that the subject of this expectation is not (equal to) expected.

Return
an Expect for the subject of this expectation.

infix fun <T : CharSequence> Expect<T>.notToBe(empty: empty): Expect<T> (source)

Expects that the subject of this expectation (a CharSequence) CharSequence.kotlin.text.isNotEmpty.

expect("XYZ") notToBe empty

fails {
    expect("") notToBe empty
}

// use `notToBe blank` to check for whitespaces
expect(" ") notToBe empty

Parameters

empty - Use the pseudo-keyword empty.

Return
This assertion container to support a fluent API.

infix fun <T : CharSequence> Expect<T>.notToBe(blank: blank): Expect<T> (source)

Expects that the subject of this expectation (a CharSequence) CharSequence.kotlin.text.isNotBlank.

expect("XZY") notToBe blank

fails {
    expect(" ") notToBe blank
}

fails { // because subject is empty but contains no whitespaces
    expect("") notToBe blank
}

Parameters

blank - Use the pseudo-keyword blank.

Return
This assertion container to support a fluent API.

infix fun <T : Path> Expect<T>.notToBe(existing: existing): Expect<T> (source)

Expects that the subject of this expectation (a Path) does not exist; meaning that there is no file system entry at the location the Path points to.

This assertion resolves symbolic links. Therefore, if a symbolic link exists at the location the subject points to, then the search will continue at that location.

Return
an Expect for the subject of this expectation.

Since
0.12.0