Skip to content

Commit

Permalink
getDataFileContent() function removed to Utils.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
Tan108 committed Apr 3, 2024
1 parent c076427 commit ce36abf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/main/kotlin/com/featurevisor/testRunner/TestExecuter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -132,19 +132,6 @@ private fun executeTest(filePath: String, dataFile: DataFile, option: TestProjec
return executionResult
}

fun getDataFileContent(featureName: String, environment: String, projectRootPath: String) =
try {
getJsonForFeatureUsingCommand(
featureName = featureName,
environment = environment,
projectRootPath = projectRootPath
)?.run {
convertToDataClass<DatafileContent>()
}
} catch (e: Exception) {
printMessageInRedColor("Exception while parsing data file --> ${e.message}")
null
}



Expand Down
14 changes: 14 additions & 0 deletions src/main/kotlin/com/featurevisor/testRunner/Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,18 @@ fun buildDataFileForBothEnvironments(projectRootPath: String): DataFile {
)
}

fun getDataFileContent(featureName: String, environment: String, projectRootPath: String) =
try {
getJsonForFeatureUsingCommand(
featureName = featureName,
environment = environment,
projectRootPath = projectRootPath
)?.run {
convertToDataClass<DatafileContent>()
}
} catch (e: Exception) {
printMessageInRedColor("Exception while parsing data file --> ${e.message}")
null
}


0 comments on commit ce36abf

Please sign in to comment.