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

net.serenitybdd.screenplay.ensure.ElementQualifier.kt Maven / Gradle / Ivy

package net.serenitybdd.screenplay.ensure

class ElementQualifier(val singularForm: String, val pluralForm: String) {

    companion object {
        val IS_ARE = ElementQualifier("is", "are")
        val HAS_HAVE = ElementQualifier("has", "have")
        val MATCHES_MATCH = ElementQualifier("matches", "match")
    }

    fun resolve(number : GrammaticalNumber) = when(number) {
        GrammaticalNumber.SINGULAR -> singularForm;
        GrammaticalNumber.PLURAL -> pluralForm
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy