toBeIn

infix fun Expect<Char>.toBeIn(expected: CharRange): Expect<Char>(source)

Expects that the subject of this expectation is within the expected range.

Return

an Expect for the subject of this expectation.

Since

1.3.0

Samples

expect('c') toBeIn 'a'..'f'

fails {
    expect('A') toBeIn 'a'..'f'
}

infix fun Expect<Int>.toBeIn(expected: IntRange): Expect<Int>(source)

Expects that the subject of this expectation is within the expected range.

Return

an Expect for the subject of this expectation.

Since

1.3.0

Samples

expect(3) toBeIn 1..5

fails {
    expect(0) toBeIn 1..5
}

infix fun Expect<Long>.toBeIn(expected: LongRange): Expect<Long>(source)

Expects that the subject of this expectation is within the expected range.

Return

an Expect for the subject of this expectation.

Since

1.3.0

Samples

expect(100L) toBeIn 50L..150L

fails {
    expect(0L) toBeIn 50L..150L
}