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

io.specmatic.core.utilities.Flags.kt Maven / Gradle / Ivy

Go to download

Turn your contracts into executable specifications. Contract Driven Development - Collaboratively Design & Independently Deploy MicroServices & MicroFrontends.

There is a newer version: 2.0.37
Show newest version
package io.specmatic.core.utilities

class Flags {
    companion object {
        const val SPECMATIC_GENERATIVE_TESTS = "SPECMATIC_GENERATIVE_TESTS"
        const val ONLY_POSITIVE = "ONLY_POSITIVE"
        const val VALIDATE_RESPONSE_VALUE = "VALIDATE_RESPONSE_VALUE"
        const val EXTENSIBLE_SCHEMA = "EXTENSIBLE_SCHEMA"
        const val MAX_TEST_REQUEST_COMBINATIONS = "MAX_TEST_REQUEST_COMBINATIONS"
        const val SCHEMA_EXAMPLE_DEFAULT = "SCHEMA_EXAMPLE_DEFAULT"
        const val SPECMATIC_TEST_PARALLELISM = "SPECMATIC_TEST_PARALLELISM"
        const val SPECMATIC_STUB_DELAY = "SPECMATIC_STUB_DELAY"
        const val SPECMATIC_TEST_TIMEOUT = "SPECMATIC_TEST_TIMEOUT"

        const val EXAMPLE_DIRECTORIES = "EXAMPLE_DIRECTORIES"

        fun getStringValue(flagName: String): String? = System.getenv(flagName) ?: System.getProperty(flagName)

        fun getBooleanValue(flagName: String) = ( getStringValue(flagName) ?: "false").toBoolean()

        fun getLongValue(flagName: String): Long? = ( getStringValue(flagName))?.toLong()
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy