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

net.serenitybdd.reports.configuration.StringReportProperty.kt Maven / Gradle / Ivy

There is a newer version: 4.2.9
Show newest version
package net.serenitybdd.reports.configuration

import net.serenitybdd.model.environment.EnvironmentSpecificConfiguration
import net.thucydides.model.ThucydidesSystemProperty
import net.thucydides.model.util.EnvironmentVariables

class StringReportProperty(val property: String, val defaultValue: String) : ReportProperty {
    constructor(property: ThucydidesSystemProperty, defaultValue: String) : this(property.toString(), defaultValue)

    override fun configuredIn(environmentVariables: EnvironmentVariables) : String {
        return EnvironmentSpecificConfiguration.from(environmentVariables)
                .getOptionalProperty(property)
                .orElse(defaultValue)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy