All Downloads are FREE. Search and download functionalities are using the official Maven repository.

main.kotlin.ch.tutteli.atrium.logic.logic.kt Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
@file:Suppress("ObjectPropertyName", "FunctionName")

package ch.tutteli.atrium.logic

import ch.tutteli.atrium.assertions.Assertion
import ch.tutteli.atrium.creating.AssertionContainer
import ch.tutteli.atrium.creating.Expect

/**
 * Appends the [Assertion] the given [assertionCreator] creates based on this [Expect].
 *
 * Use [_logic] for more sophisticated scenarios, like feature extraction.
 */
inline fun  Expect._logicAppend(assertionCreator: AssertionContainer.() -> Assertion): Expect =
    _logic.run { append(assertionCreator()) }

/**
 * Entry point to the logic level of Atrium -- which is one level deeper than the API --
 * on which assertion functions do not return [Expect]s but [Assertion]s and the like.
 *
 * Use [_logicAppend] in case you want to create and append an [Assertion] to this [Expect].
 */
inline val  Expect._logic: AssertionContainer
    get() = this.toAssertionContainer()





© 2015 - 2024 Weber Informatics LLC | Privacy Policy