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

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

There is a newer version: 1.0.0
Show newest version
package ch.tutteli.atrium.logic

import ch.tutteli.atrium.assertions.Assertion
import ch.tutteli.atrium.creating.AssertionContainer
import ch.tutteli.atrium.logic.creating.maplike.contains.MapLikeContains
import ch.tutteli.atrium.logic.creating.maplike.contains.searchbehaviours.NoOpSearchBehaviour
import ch.tutteli.atrium.logic.creating.transformers.FeatureExtractorBuilder
import ch.tutteli.atrium.logic.creating.typeutils.MapLike
import ch.tutteli.atrium.logic.creating.typeutils.IterableLike

/**
 * Collection of assertion functions and builders which are applicable to subjects which can be transformed to a
 * [Map] - intended for types which are Map like such as [IterableLike] with an element type [Pair].
 */
interface MapLikeAssertions {

    fun  builderContainsInMapLike(
        container: AssertionContainer,
        converter: (T) -> Map
    ): MapLikeContains.EntryPointStep

    fun  containsKey(
        container: AssertionContainer,
        converter: (T) -> Map,
        key: K
    ): Assertion

    fun  containsNotKey(
        container: AssertionContainer,
        converter: (T) -> Map,
        key: K
    ): Assertion

    fun  getExisting(
        container: AssertionContainer,
        converter: (T) -> Map,
        key: K
    ): FeatureExtractorBuilder.ExecutionStep
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy