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

application.ContractToCheck.kt Maven / Gradle / Ivy

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

import io.specmatic.core.Feature
import io.specmatic.core.git.GitCommand
import java.io.File

class ContractToCheck(private val contractFile: CanonicalFile, private val git: GitCommand) {
    val path: String = contractFile.path

    constructor(contractFilePath: String, git: GitCommand): this(CanonicalFile(contractFilePath), git)

    fun fetchAllOtherContracts(): List> =
        listOfAllContractFiles(File(git.gitRoot())).filterNot {
            it.path == contractFile.path
        }.mapNotNull {
            loadContractData(it)
        }

    fun getPathsInContract(): List? = urlPaths(contractFile.readText(), contractFile.file.canonicalPath)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy