application.test.MonochromePrinter.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of specmatic-executable Show documentation
Show all versions of specmatic-executable Show documentation
Command-line standalone executable jar for Specmatic
package application.test
import org.junit.platform.engine.TestExecutionResult
import org.junit.platform.launcher.TestIdentifier
class MonochromePrinter: ContractExecutionPrinter {
override fun printFinalSummary(testSummary: TestSummary) {
println(testSummary.message)
println()
println("Executed at ${currentDateAndTime()}")
}
override fun printTestSummary(testIdentifier: TestIdentifier?, testExecutionResult: TestExecutionResult?) {
println(testStatusMessage(testIdentifier, testExecutionResult))
}
override fun printFailureTitle(failures: String) {
println(failures)
}
}
fun currentDateAndTime(): String {
return java.time.LocalDateTime.now().toString()
}