mirror of
https://github.com/jlengrand/atrium.git
synced 2026-03-10 08:01:19 +00:00
move @since at the end of KDoc
This commit is contained in:
@@ -62,9 +62,9 @@ fun <T> Expect<T>.isNotSameAs(expected: T): Expect<T> = _logicAppend { isNotSame
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.15.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.AnyExpectationSamples.because
|
||||
*
|
||||
* @since 0.15.0
|
||||
*/
|
||||
fun <T> Expect<T>.because(reason: String, assertionCreator: Expect<T>.() -> Unit): Expect<T> =
|
||||
_logicAppend { because(reason, assertionCreator) }
|
||||
@@ -223,9 +223,9 @@ infix fun <T> Expect<T>.and(assertionCreator: Expect<T>.() -> Unit): Expect<T> =
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.13.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.AnyAssertionSamples.isNoneOf
|
||||
*
|
||||
* @since 0.13.0
|
||||
*/
|
||||
@Deprecated(
|
||||
"Use notToEqualOneOf; will be removed latest with 1.0.0",
|
||||
@@ -243,9 +243,9 @@ fun <T> Expect<T>.isNoneOf(expected: T, vararg otherValues: T): Expect<T> =
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
* @throws IllegalArgumentException in case the iterable is empty.
|
||||
*
|
||||
* @since 0.13.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.AnyAssertionSamples.isNotIn
|
||||
*
|
||||
* @since 0.13.0
|
||||
*/
|
||||
@Deprecated("Use notToBeIn; will be removed latest with 1.0.0", ReplaceWith("this.notToBeIn<T>(expected)"))
|
||||
fun <T> Expect<T>.isNotIn(expected: IterableLike): Expect<T> =
|
||||
|
||||
@@ -13,9 +13,9 @@ import kotlin.reflect.KClass
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.17.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.AnyExpectationSamples.toEqual
|
||||
*
|
||||
* @since 0.17.0
|
||||
*/
|
||||
fun <T> Expect<T>.toEqual(expected: T): Expect<T> = _logicAppend { toBe(expected) }
|
||||
|
||||
@@ -24,9 +24,9 @@ fun <T> Expect<T>.toEqual(expected: T): Expect<T> = _logicAppend { toBe(expected
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.17.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.AnyExpectationSamples.notToEqual
|
||||
*
|
||||
* @since 0.17.0
|
||||
*/
|
||||
fun <T> Expect<T>.notToEqual(expected: T): Expect<T> = _logicAppend { notToBe(expected) }
|
||||
|
||||
@@ -35,9 +35,9 @@ fun <T> Expect<T>.notToEqual(expected: T): Expect<T> = _logicAppend { notToBe(ex
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.17.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.AnyExpectationSamples.toBeTheInstance
|
||||
*
|
||||
* @since 0.17.0
|
||||
*/
|
||||
fun <T> Expect<T>.toBeTheInstance(expected: T): Expect<T> = _logicAppend { isSameAs(expected) }
|
||||
|
||||
@@ -46,9 +46,9 @@ fun <T> Expect<T>.toBeTheInstance(expected: T): Expect<T> = _logicAppend { isSam
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.17.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.AnyExpectationSamples.notToBeTheInstance
|
||||
*
|
||||
* @since 0.17.0
|
||||
*/
|
||||
fun <T> Expect<T>.notToBeTheInstance(expected: T): Expect<T> = _logicAppend { isNotSameAs(expected) }
|
||||
|
||||
@@ -106,9 +106,9 @@ inline fun <reified T : Any> Expect<T?>.notToEqualNull(noinline assertionCreator
|
||||
*
|
||||
* @return An [Expect] with the new type [TSub].
|
||||
*
|
||||
* @since 0.17.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.AnyExpectationSamples.toBeAnInstanceOfFeature
|
||||
*
|
||||
* @since 0.17.0
|
||||
*/
|
||||
inline fun <reified TSub : Any> Expect<*>.toBeAnInstanceOf(): Expect<TSub> = toBeAnInstanceOf(TSub::class).transform()
|
||||
|
||||
@@ -156,9 +156,9 @@ internal fun <TSub : Any> Expect<*>.toBeAnInstanceOf(kClass: KClass<TSub>): Subj
|
||||
*
|
||||
* @return An [Expect] with the new type [TSub].
|
||||
*
|
||||
* @since 0.17.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.AnyExpectationSamples.toBeAnInstanceOf
|
||||
*
|
||||
* @since 0.17.0
|
||||
*/
|
||||
inline fun <reified TSub : Any> Expect<*>.toBeAnInstanceOf(noinline assertionCreator: Expect<TSub>.() -> Unit): Expect<TSub> =
|
||||
toBeAnInstanceOf(TSub::class).transformAndAppend(assertionCreator)
|
||||
@@ -169,9 +169,9 @@ inline fun <reified TSub : Any> Expect<*>.toBeAnInstanceOf(noinline assertionCre
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.17.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.AnyExpectationSamples.notToEqualOneOf
|
||||
*
|
||||
* @since 0.17.0
|
||||
*/
|
||||
fun <T> Expect<T>.notToEqualOneOf(expected: T, vararg otherValues: T): Expect<T> =
|
||||
_logicAppend { isNotIn(expected glue otherValues) }
|
||||
@@ -185,9 +185,9 @@ fun <T> Expect<T>.notToEqualOneOf(expected: T, vararg otherValues: T): Expect<T>
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
* @throws IllegalArgumentException in case the iterable is empty.
|
||||
*
|
||||
* @since 0.17.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.AnyExpectationSamples.notToEqualOneIn
|
||||
*
|
||||
* @since 0.17.0
|
||||
*/
|
||||
fun <T> Expect<T>.notToEqualOneIn(expected: IterableLike): Expect<T> =
|
||||
_logicAppend { isNotIn(iterableLikeToIterable(expected)) }
|
||||
|
||||
@@ -13,9 +13,9 @@ import kotlin.jvm.JvmName
|
||||
*
|
||||
* @return The newly created [Expect] for the transformed subject.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.ArrayAssertionSamples.asListFeature
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
fun <E> Expect<out Array<out E>>.asList(): Expect<List<E>> =
|
||||
_logic.changeSubject.unreported { it.asList() }
|
||||
@@ -29,9 +29,9 @@ fun <E> Expect<out Array<out E>>.asList(): Expect<List<E>> =
|
||||
*
|
||||
* @return The newly created [Expect] for the transformed subject.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.ArrayAssertionSamples.asList
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
fun <E> Expect<Array<E>>.asList(assertionCreator: Expect<List<E>>.() -> Unit): Expect<Array<E>> =
|
||||
apply { asList()._logic.appendAssertionsCreatedBy(assertionCreator) }
|
||||
@@ -45,9 +45,9 @@ fun <E> Expect<Array<E>>.asList(assertionCreator: Expect<List<E>>.() -> Unit): E
|
||||
*
|
||||
* @return The newly created [Expect] for the transformed subject.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.ArrayAssertionSamples.asListEOut
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
@JvmName("asListEOut")
|
||||
fun <E> Expect<Array<out E>>.asList(assertionCreator: Expect<List<E>>.() -> Unit): Expect<Array<out E>> =
|
||||
@@ -61,9 +61,9 @@ fun <E> Expect<Array<out E>>.asList(assertionCreator: Expect<List<E>>.() -> Unit
|
||||
*
|
||||
* @return The newly created [Expect] for the transformed subject.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.ArrayAssertionSamples.byteArrAsListFeature
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
@JvmName("byteArrAsList")
|
||||
fun Expect<ByteArray>.asList(): Expect<List<Byte>> =
|
||||
@@ -78,9 +78,9 @@ fun Expect<ByteArray>.asList(): Expect<List<Byte>> =
|
||||
*
|
||||
* @return The newly created [Expect] for the transformed subject.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.ArrayAssertionSamples.byteArrAsList
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
@JvmName("byteArrAsList")
|
||||
fun Expect<ByteArray>.asList(assertionCreator: Expect<List<Byte>>.() -> Unit): Expect<ByteArray> =
|
||||
@@ -95,9 +95,9 @@ fun Expect<ByteArray>.asList(assertionCreator: Expect<List<Byte>>.() -> Unit): E
|
||||
*
|
||||
* @return The newly created [Expect] for the transformed subject.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.ArrayAssertionSamples.charArrAsListFeature
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
@JvmName("charArrAsList")
|
||||
fun Expect<CharArray>.asList(): Expect<List<Char>> =
|
||||
@@ -112,9 +112,9 @@ fun Expect<CharArray>.asList(): Expect<List<Char>> =
|
||||
*
|
||||
* @return The newly created [Expect] for the transformed subject.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.ArrayAssertionSamples.charArrAsList
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
@JvmName("charArrAsList")
|
||||
fun Expect<CharArray>.asList(assertionCreator: Expect<List<Char>>.() -> Unit): Expect<CharArray> =
|
||||
@@ -129,9 +129,9 @@ fun Expect<CharArray>.asList(assertionCreator: Expect<List<Char>>.() -> Unit): E
|
||||
*
|
||||
* @return The newly created [Expect] for the transformed subject.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.ArrayAssertionSamples.shortArrAsListFeature
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
@JvmName("shortArrAsList")
|
||||
fun Expect<ShortArray>.asList(): Expect<List<Short>> =
|
||||
@@ -146,9 +146,9 @@ fun Expect<ShortArray>.asList(): Expect<List<Short>> =
|
||||
*
|
||||
* @return The newly created [Expect] for the transformed subject.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.ArrayAssertionSamples.shortArrAsList
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
@JvmName("shortArrAsList")
|
||||
fun Expect<ShortArray>.asList(assertionCreator: Expect<List<Short>>.() -> Unit): Expect<ShortArray> =
|
||||
@@ -163,9 +163,9 @@ fun Expect<ShortArray>.asList(assertionCreator: Expect<List<Short>>.() -> Unit):
|
||||
*
|
||||
* @return The newly created [Expect] for the transformed subject.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.ArrayAssertionSamples.intArrAsListFeature
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
@JvmName("intArrAsList")
|
||||
fun Expect<IntArray>.asList(): Expect<List<Int>> =
|
||||
@@ -180,9 +180,9 @@ fun Expect<IntArray>.asList(): Expect<List<Int>> =
|
||||
*
|
||||
* @return The newly created [Expect] for the transformed subject.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.ArrayAssertionSamples.intArrAsList
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
@JvmName("intArrAsList")
|
||||
fun Expect<IntArray>.asList(assertionCreator: Expect<List<Int>>.() -> Unit): Expect<IntArray> =
|
||||
@@ -197,9 +197,9 @@ fun Expect<IntArray>.asList(assertionCreator: Expect<List<Int>>.() -> Unit): Exp
|
||||
*
|
||||
* @return The newly created [Expect] for the transformed subject.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.ArrayAssertionSamples.longArrAsListFeature
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
@JvmName("longArrAsList")
|
||||
fun Expect<LongArray>.asList(): Expect<List<Long>> =
|
||||
@@ -214,9 +214,9 @@ fun Expect<LongArray>.asList(): Expect<List<Long>> =
|
||||
*
|
||||
* @return The newly created [Expect] for the transformed subject.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.ArrayAssertionSamples.longArrAsList
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
@JvmName("longArrAsList")
|
||||
fun Expect<LongArray>.asList(assertionCreator: Expect<List<Long>>.() -> Unit): Expect<LongArray> =
|
||||
@@ -231,9 +231,9 @@ fun Expect<LongArray>.asList(assertionCreator: Expect<List<Long>>.() -> Unit): E
|
||||
*
|
||||
* @return The newly created [Expect] for the transformed subject.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.ArrayAssertionSamples.floatArrAsListFeature
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
@JvmName("floatArrAsList")
|
||||
fun Expect<FloatArray>.asList(): Expect<List<Float>> =
|
||||
@@ -248,9 +248,9 @@ fun Expect<FloatArray>.asList(): Expect<List<Float>> =
|
||||
*
|
||||
* @return The newly created [Expect] for the transformed subject.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.ArrayAssertionSamples.floatArrAsList
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
@JvmName("floatArrAsList")
|
||||
fun Expect<FloatArray>.asList(assertionCreator: Expect<List<Float>>.() -> Unit): Expect<FloatArray> =
|
||||
@@ -265,9 +265,9 @@ fun Expect<FloatArray>.asList(assertionCreator: Expect<List<Float>>.() -> Unit):
|
||||
*
|
||||
* @return The newly created [Expect] for the transformed subject.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.ArrayAssertionSamples.doubleArrAsListFeature
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
@JvmName("doubleArrAsList")
|
||||
fun Expect<DoubleArray>.asList(): Expect<List<Double>> =
|
||||
@@ -282,9 +282,9 @@ fun Expect<DoubleArray>.asList(): Expect<List<Double>> =
|
||||
*
|
||||
* @return The newly created [Expect] for the transformed subject.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.ArrayAssertionSamples.doubleArrAsList
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
@JvmName("doubleArrAsList")
|
||||
fun Expect<DoubleArray>.asList(assertionCreator: Expect<List<Double>>.() -> Unit): Expect<DoubleArray> =
|
||||
@@ -299,9 +299,9 @@ fun Expect<DoubleArray>.asList(assertionCreator: Expect<List<Double>>.() -> Unit
|
||||
*
|
||||
* @return The newly created [Expect] for the transformed subject.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.ArrayAssertionSamples.booleanArrAsListFeature
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
@JvmName("boolArrAsList")
|
||||
fun Expect<BooleanArray>.asList(): Expect<List<Boolean>> =
|
||||
@@ -316,8 +316,9 @@ fun Expect<BooleanArray>.asList(): Expect<List<Boolean>> =
|
||||
*
|
||||
* @return The newly created [Expect] for the transformed subject.
|
||||
*
|
||||
* @since 0.9.0
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.ArrayAssertionSamples.booleanArrAsList
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
@JvmName("boolArrAsList")
|
||||
fun Expect<BooleanArray>.asList(assertionCreator: Expect<List<Boolean>>.() -> Unit): Expect<BooleanArray> =
|
||||
|
||||
@@ -136,9 +136,9 @@ fun <T : CharSequence> Expect<T>.containsRegex(pattern: String, vararg otherPatt
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.CharSequenceAssertionSamples.containsRegex
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
fun <T : CharSequence> Expect<T>.containsRegex(pattern: Regex, vararg otherPatterns: Regex): Expect<T> =
|
||||
contains.atLeast(1).regex(pattern, *otherPatterns)
|
||||
@@ -180,9 +180,9 @@ fun <T : CharSequence> Expect<T>.startsNotWith(expected: CharSequence): Expect<T
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.CharSequenceAssertionSamples.startsNotWithChar
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
fun <T : CharSequence> Expect<T>.startsNotWith(expected: Char): Expect<T> =
|
||||
startsNotWith(expected.toString())
|
||||
@@ -203,9 +203,9 @@ fun <T : CharSequence> Expect<T>.endsWith(expected: CharSequence): Expect<T> =
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.CharSequenceAssertionSamples.endsWithChar
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
fun <T : CharSequence> Expect<T>.endsWith(expected: Char): Expect<T> =
|
||||
endsWith(expected.toString())
|
||||
@@ -225,8 +225,9 @@ fun <T : CharSequence> Expect<T>.endsNotWith(expected: CharSequence): Expect<T>
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.9.0
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.CharSequenceAssertionSamples.endsNotWithChar
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
fun <T : CharSequence> Expect<T>.endsNotWith(expected: Char): Expect<T> =
|
||||
endsNotWith(expected.toString())
|
||||
@@ -269,9 +270,9 @@ fun <T : CharSequence> Expect<T>.isNotBlank(): Expect<T> =
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.CharSequenceAssertionSamples.matches
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
fun <T : CharSequence> Expect<T>.matches(expected: Regex): Expect<T> =
|
||||
_logicAppend { matches(expected) }
|
||||
@@ -283,9 +284,9 @@ fun <T : CharSequence> Expect<T>.matches(expected: Regex): Expect<T> =
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.CharSequenceAssertionSamples.mismatches
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
fun <T : CharSequence> Expect<T>.mismatches(expected: Regex): Expect<T> =
|
||||
_logicAppend { mismatches(expected) }
|
||||
|
||||
@@ -53,9 +53,9 @@ fun <T : Comparable<T>> Expect<T>.isGreaterThanOrEqual(expected: T): Expect<T> =
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.13.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.ComparableAssertionSamples.isEqualComparingTo
|
||||
*
|
||||
* @since 0.13.0
|
||||
*/
|
||||
fun <T : Comparable<T>> Expect<T>.isEqualComparingTo(expected: T): Expect<T> =
|
||||
_logicAppend { isEqualComparingTo(expected) }
|
||||
|
||||
@@ -10,9 +10,9 @@ import ch.tutteli.atrium.logic.hasNotNext
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.13.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.IteratorAssertionSamples.hasNext
|
||||
*
|
||||
* @since 0.13.0
|
||||
*/
|
||||
fun <E, T : Iterator<E>> Expect<T>.hasNext(): Expect<T> =
|
||||
_logicAppend { hasNext() }
|
||||
@@ -22,9 +22,9 @@ fun <E, T : Iterator<E>> Expect<T>.hasNext(): Expect<T> =
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.13.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.IteratorAssertionSamples.hasNoNext
|
||||
*
|
||||
* @since 0.13.0
|
||||
*/
|
||||
fun <E, T : Iterator<E>> Expect<T>.hasNotNext(): Expect<T> =
|
||||
_logicAppend { hasNotNext() }
|
||||
|
||||
@@ -304,9 +304,9 @@ fun <T : Path> Expect<T>.isDirectory(): Expect<T> =
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.16.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.PathAssertionSamples.isASymbolicLink
|
||||
*
|
||||
* @since 0.16.0
|
||||
*/
|
||||
fun <T : Path> Expect<T>.isSymbolicLink(): Expect<T> =
|
||||
_logicAppend { isSymbolicLink() }
|
||||
@@ -339,9 +339,9 @@ fun <T : Path> Expect<T>.isRelative(): Expect<T> =
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.16.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.deprecated.PathAssertionSamples.isEmptyDirectory
|
||||
*
|
||||
* @since 0.16.0
|
||||
*/
|
||||
fun <T : Path> Expect<T>.isEmptyDirectory(): Expect<T> =
|
||||
_logicAppend { isEmptyDirectory() }
|
||||
|
||||
@@ -62,8 +62,9 @@ infix fun <T> Expect<T>.isNotSameAs(expected: T): Expect<T> = _logicAppend { isN
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.15.0
|
||||
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.AnyExpectationSamples.becauseOf
|
||||
*
|
||||
* @since 0.15.0
|
||||
*/
|
||||
infix fun <T> Expect<T>.because(keyWithCreator: KeyWithCreator<String, T>): Expect<T> =
|
||||
_logicAppend { because(keyWithCreator.key, keyWithCreator.assertionCreator) }
|
||||
|
||||
@@ -13,9 +13,9 @@ import kotlin.reflect.KClass
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.17.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.AnyExpectationSamples.toEqual
|
||||
*
|
||||
* @since 0.17.0
|
||||
*/
|
||||
infix fun <T> Expect<T>.toEqual(expected: T): Expect<T> = _logicAppend { toBe(expected) }
|
||||
|
||||
@@ -24,9 +24,9 @@ infix fun <T> Expect<T>.toEqual(expected: T): Expect<T> = _logicAppend { toBe(ex
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.17.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.AnyExpectationSamples.notToEqual
|
||||
*
|
||||
* @since 0.17.0
|
||||
*/
|
||||
infix fun <T> Expect<T>.notToEqual(expected: T): Expect<T> = _logicAppend { notToBe(expected) }
|
||||
|
||||
@@ -35,9 +35,9 @@ infix fun <T> Expect<T>.notToEqual(expected: T): Expect<T> = _logicAppend { notT
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.17.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.AnyExpectationSamples.toBeTheInstance
|
||||
*
|
||||
* @since 0.17.0
|
||||
*/
|
||||
infix fun <T> Expect<T>.toBeTheInstance(expected: T): Expect<T> = _logicAppend { isSameAs(expected) }
|
||||
|
||||
@@ -46,9 +46,9 @@ infix fun <T> Expect<T>.toBeTheInstance(expected: T): Expect<T> = _logicAppend {
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.17.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.AnyExpectationSamples.notToBeTheInstance
|
||||
*
|
||||
* @since 0.17.0
|
||||
*/
|
||||
infix fun <T> Expect<T>.notToBeTheInstance(expected: T): Expect<T> = _logicAppend { isNotSameAs(expected) }
|
||||
|
||||
@@ -59,9 +59,9 @@ infix fun <T> Expect<T>.notToBeTheInstance(expected: T): Expect<T> = _logicAppen
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.17.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.AnyExpectationSamples.toEqualNullIfNullGivenElse
|
||||
*
|
||||
* @since 0.17.0
|
||||
*/
|
||||
infix fun <T : Any> Expect<T?>.toEqualNullIfNullGivenElse(
|
||||
assertionCreatorOrNull: (Expect<T>.() -> Unit)?
|
||||
@@ -75,9 +75,9 @@ infix fun <T : Any> Expect<T?>.toEqualNullIfNullGivenElse(
|
||||
*
|
||||
* @return An [Expect] with the non-nullable type [T] (was `T?` before).
|
||||
*
|
||||
* @since 0.17.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.AnyExpectationSamples.notToEqualNullFeature
|
||||
*
|
||||
* @since 0.17.0
|
||||
*/
|
||||
inline infix fun <reified T : Any> Expect<T?>.notToEqualNull(@Suppress("UNUSED_PARAMETER") o: o): Expect<T> =
|
||||
notToEqualNullButToBeAnInstanceOf(T::class).transform()
|
||||
@@ -88,9 +88,9 @@ inline infix fun <reified T : Any> Expect<T?>.notToEqualNull(@Suppress("UNUSED_P
|
||||
*
|
||||
* @return An [Expect] with the non-nullable type [T] (was `T?` before).
|
||||
*
|
||||
* @since 0.17.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.AnyExpectationSamples.notToEqualNull
|
||||
*
|
||||
* @since 0.17.0
|
||||
*/
|
||||
inline infix fun <reified T : Any> Expect<T?>.notToEqualNull(noinline assertionCreator: Expect<T>.() -> Unit): Expect<T> =
|
||||
notToEqualNullButToBeAnInstanceOf(T::class).transformAndAppend(assertionCreator)
|
||||
@@ -118,9 +118,9 @@ internal fun <T : Any> Expect<T?>.notToEqualNullButToBeAnInstanceOf(kClass: KCla
|
||||
*
|
||||
* @return An [Expect] with the new type [TSub].
|
||||
*
|
||||
* @since 0.17.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.AnyExpectationSamples.toBeAnInstanceOfFeature
|
||||
*
|
||||
* @since 0.17.0
|
||||
*/
|
||||
//TODO make infix and add `o` as parameter as soon as https://youtrack.jetbrains.com/issue/KT-21593 is fixed
|
||||
inline fun <reified TSub : Any> Expect<*>.toBeAnInstanceOf(): Expect<TSub> =
|
||||
@@ -170,9 +170,9 @@ internal fun <TSub : Any> Expect<*>.toBeAnInstanceOf(kClass: KClass<TSub>): Subj
|
||||
*
|
||||
* @return An [Expect] with the new type [TSub].
|
||||
*
|
||||
* @since 0.17.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.AnyExpectationSamples.toBeAnInstanceOf
|
||||
*
|
||||
* @since 0.17.0
|
||||
*/
|
||||
inline infix fun <reified TSub : Any> Expect<*>.toBeAnInstanceOf(noinline assertionCreator: Expect<TSub>.() -> Unit): Expect<TSub> =
|
||||
toBeAnInstanceOf(TSub::class).transformAndAppend(assertionCreator)
|
||||
@@ -185,9 +185,9 @@ inline infix fun <reified TSub : Any> Expect<*>.toBeAnInstanceOf(noinline assert
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.17.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.AnyExpectationSamples.notToEqualOneOf
|
||||
*
|
||||
* @since 0.17.0
|
||||
*/
|
||||
infix fun <T> Expect<T>.notToEqualOneOf(values: Values<T>): Expect<T> =
|
||||
_logicAppend { isNotIn(values.toList()) }
|
||||
@@ -201,9 +201,9 @@ infix fun <T> Expect<T>.notToEqualOneOf(values: Values<T>): Expect<T> =
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
* @throws IllegalArgumentException in case the iterable is empty.
|
||||
*
|
||||
* @since 0.17.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.AnyExpectationSamples.notToEqualOneIn
|
||||
*
|
||||
* @since 0.17.0
|
||||
*/
|
||||
infix fun <T> Expect<T>.notToEqualOneIn(expected: IterableLike): Expect<T> =
|
||||
_logicAppend { isNotIn(iterableLikeToIterable(expected)) }
|
||||
|
||||
@@ -224,9 +224,9 @@ infix fun <T : CharSequence> Expect<T>.startsWith(expected: CharSequence): Expec
|
||||
*
|
||||
* @return This assertion container to support a fluent API.
|
||||
*
|
||||
* @since 0.12.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.deprecated.CharSequenceAssertionSamples.startsWithChar
|
||||
*
|
||||
* @since 0.12.0
|
||||
*/
|
||||
infix fun <T : CharSequence> Expect<T>.startsWith(expected: Char): Expect<T> =
|
||||
it startsWith expected.toString()
|
||||
@@ -246,9 +246,9 @@ infix fun <T : CharSequence> Expect<T>.startsNotWith(expected: CharSequence): Ex
|
||||
*
|
||||
* @return This assertion container to support a fluent API.
|
||||
*
|
||||
* @since 0.12.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.deprecated.CharSequenceAssertionSamples.startsNotWithChar
|
||||
*
|
||||
* @since 0.12.0
|
||||
*/
|
||||
infix fun <T : CharSequence> Expect<T>.startsNotWith(expected: Char): Expect<T> =
|
||||
it startsNotWith expected.toString()
|
||||
@@ -269,9 +269,9 @@ infix fun <T : CharSequence> Expect<T>.endsWith(expected: CharSequence): Expect<
|
||||
*
|
||||
* @return This assertion container to support a fluent API.
|
||||
*
|
||||
* @since 0.12.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.deprecated.CharSequenceAssertionSamples.endsWithChar
|
||||
*
|
||||
* @since 0.12.0
|
||||
*/
|
||||
infix fun <T : CharSequence> Expect<T>.endsWith(expected: Char): Expect<T> =
|
||||
it endsWith expected.toString()
|
||||
@@ -291,9 +291,9 @@ infix fun <T : CharSequence> Expect<T>.endsNotWith(expected: CharSequence): Expe
|
||||
*
|
||||
* @return This assertion container to support a fluent API.
|
||||
*
|
||||
* @since 0.12.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.deprecated.CharSequenceAssertionSamples.endsNotWithChar
|
||||
*
|
||||
* @since 0.12.0
|
||||
*/
|
||||
infix fun <T : CharSequence> Expect<T>.endsNotWith(expected: Char): Expect<T> =
|
||||
it endsNotWith expected.toString()
|
||||
@@ -342,9 +342,9 @@ infix fun <T : CharSequence> Expect<T>.notToBe(@Suppress("UNUSED_PARAMETER") bla
|
||||
*
|
||||
* @return This assertion container to support a fluent API.
|
||||
*
|
||||
* @since 0.12.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.deprecated.CharSequenceAssertionSamples.matches
|
||||
*
|
||||
* @since 0.12.0
|
||||
*/
|
||||
infix fun <T : CharSequence> Expect<T>.matches(expected: Regex): Expect<T> =
|
||||
_logicAppend { matches(expected) }
|
||||
@@ -356,9 +356,9 @@ infix fun <T : CharSequence> Expect<T>.matches(expected: Regex): Expect<T> =
|
||||
*
|
||||
* @return This assertion container to support a fluent API.
|
||||
*
|
||||
* @since 0.12.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.deprecated.CharSequenceAssertionSamples.mismatches
|
||||
*
|
||||
* @since 0.12.0
|
||||
*/
|
||||
infix fun <T : CharSequence> Expect<T>.mismatches(expected: Regex): Expect<T> =
|
||||
_logicAppend { mismatches(expected) }
|
||||
|
||||
@@ -53,9 +53,9 @@ infix fun <T : Comparable<T>> Expect<T>.isGreaterThanOrEqual(expected: T): Expec
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.13.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.deprecated.ComparableAssertionSamples.isEqualComparingTo
|
||||
*
|
||||
* @since 0.13.0
|
||||
*/
|
||||
infix fun <T : Comparable<T>> Expect<T>.isEqualComparingTo(expected: T): Expect<T> =
|
||||
_logicAppend { isEqualComparingTo(expected) }
|
||||
|
||||
@@ -180,6 +180,7 @@ infix fun <T, R> Expect<T>.feature(provider: MetaFeatureOption<T>.(T) -> MetaFea
|
||||
* e.g. `feature of({ f(it::size) }) { it toEqual 3 }`
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.12.0
|
||||
*/
|
||||
infix fun <T, R> Expect<T>.feature(of: MetaFeatureOptionWithCreator<T, R>): Expect<T> =
|
||||
|
||||
@@ -10,9 +10,9 @@ import ch.tutteli.atrium.logic.hasNotNext
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.13.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.deprecated.IteratorAssertionSamples.has
|
||||
*
|
||||
* @since 0.13.0
|
||||
*/
|
||||
infix fun <E, T : Iterator<E>> Expect<T>.has(@Suppress("UNUSED_PARAMETER") next: next): Expect<T> =
|
||||
_logicAppend { hasNext() }
|
||||
@@ -22,9 +22,9 @@ infix fun <E, T : Iterator<E>> Expect<T>.has(@Suppress("UNUSED_PARAMETER") next:
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.13.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.deprecated.IteratorAssertionSamples.hasNot
|
||||
*
|
||||
* @since 0.13.0
|
||||
*/
|
||||
infix fun <E, T : Iterator<E>> Expect<T>.hasNot(@Suppress("UNUSED_PARAMETER") next: next): Expect<T> =
|
||||
_logicAppend { hasNotNext() }
|
||||
|
||||
@@ -314,9 +314,9 @@ infix fun <T : Path> Expect<T>.toBe(@Suppress("UNUSED_PARAMETER") aDirectory: aD
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.16.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.deprecated.PathAssertionSamples.toBeASymbolicLink
|
||||
*
|
||||
* @since 0.16.0
|
||||
*/
|
||||
infix fun <T : Path> Expect<T>.toBe(@Suppress("UNUSED_PARAMETER") aSymbolicLink: aSymbolicLink): Expect<T> =
|
||||
_logicAppend { isSymbolicLink() }
|
||||
@@ -402,9 +402,9 @@ fun directoryEntries(entry: String, vararg otherEntries: String) = DirectoryEntr
|
||||
*
|
||||
* @return an [Expect] for the subject of `this` expectation.
|
||||
*
|
||||
* @since 0.16.0
|
||||
*
|
||||
* @sample ch.tutteli.atrium.api.infix.en_GB.samples.deprecated.PathAssertionSamples.toBeAnEmptyDirectory
|
||||
*
|
||||
* @since 0.16.0
|
||||
*/
|
||||
infix fun <T : Path> Expect<T>.toBe(@Suppress("UNUSED_PARAMETER") anEmptyDirectory: anEmptyDirectory): Expect<T> =
|
||||
_logicAppend { isEmptyDirectory() }
|
||||
|
||||
Reference in New Issue
Block a user