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: 1.3.39
Show newest version
package application

import `in`.specmatic.core.Feature
import `in`.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