notToStartWith

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

Return

an Expect for the subject of this expectation.

Since

0.17.0

Samples

expect("ABC").notToStartWith("X")

fails {
    expect("ABC").notToStartWith("AB")
}
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.

Return

an Expect for the subject of this expectation.

Since

0.17.0

Samples

val dir = tempDir.newDirectory("test_dir")

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

fails {
    expect(dir).notToStartWith(dir.parent)
}