io.cloudflight.platform.spring.test.jgiven.TicketDescriptionGenerator.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of platform-spring-test-bdd Show documentation
Show all versions of platform-spring-test-bdd Show documentation
Cloudflight Platform for Spring Boot
The newest version!
package io.cloudflight.platform.spring.test.jgiven
import com.tngtech.jgiven.annotation.TagDescriptionGenerator
import com.tngtech.jgiven.config.TagConfiguration
import java.util.*
internal class TicketDescriptionGenerator : TagDescriptionGenerator {
private val serverUrl = System.getProperty(TICKET_SERVER_URL, UNKNOWN_SERVER_URL)
override fun generateDescription(
tagConfiguration: TagConfiguration?,
annotation: Annotation?,
value: Any?
): String {
return String.format(Locale.ENGLISH, "$serverUrl", value, value);
}
companion object {
private const val UNKNOWN_SERVER_URL = "https://jira.unknown.com/browse/%s"
const val TICKET_SERVER_URL = "jgiven.issue.server.url"
}
}