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

application.SpecmaticConfig.kt Maven / Gradle / Ivy

There is a newer version: 1.3.39
Show newest version
package application

import `in`.specmatic.core.Configuration.Companion.globalConfigFileName
import `in`.specmatic.core.DEFAULT_WORKING_DIRECTORY
import `in`.specmatic.core.utilities.ContractPathData
import `in`.specmatic.core.utilities.contractFilePathsFrom
import org.springframework.stereotype.Component

@Component
class SpecmaticConfig {
    val configFilePath: String
        get() {
            return globalConfigFileName
        }

    fun contractStubPaths(): List {
        return contractFilePathsFrom(globalConfigFileName, DEFAULT_WORKING_DIRECTORY) { source -> source.stubContracts }.map { it.path }
    }

    fun contractTestPaths(): List {
        return contractFilePathsFrom(globalConfigFileName, DEFAULT_WORKING_DIRECTORY) { source -> source.testContracts }.map { it.path }
    }

    fun contractStubPathData(): List {
        return contractFilePathsFrom(globalConfigFileName, DEFAULT_WORKING_DIRECTORY) { source -> source.stubContracts }
    }

    fun contractTestPathData(): List {
        return contractFilePathsFrom(globalConfigFileName, DEFAULT_WORKING_DIRECTORY) { source -> source.testContracts }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy