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

notToStartWith

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

Expects that the subject of this expectation (a CharSequence) does not start with expected.

expect("ABC") notToStartWith "X"

fails {
    expect("ABC") notToStartWith "AB"
}

Return
an Expect for the subject of this expectation.

Since
0.17.0

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

Expects that the subject of this expectation (a Path) does not start with the expected.

val dir = tempDir.newDirectory("test_dir")

expect(dir) notToStartWith Paths.get("non_existing_dir")

fails {
    expect(dir) notToStartWith dir.parent
}

Return
an Expect for the subject of this expectation.

Since
0.17.0