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

toEndWith

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

Expects that the subject of this expectation (a CharSequence) ends with expected.

expect("ABC").toEndWith("BC")

fails {
    expect("ABC").toEndWith("X")
}

Return
an Expect for the subject of this expectation.

Since
0.17.0

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

Expects that the subject of this expectation (a Path) ends with the expected Path.

val dir = tempDir.newDirectory("test_dir")

expect(dir).toEndWith(Paths.get("test_dir"))

fails {
    expect(dir).toEndWith(Paths.get("non_existing_dir"))
}

Return
an Expect for the subject of this expectation.

Since
0.17.0