ExternalDocumentationRule

class ExternalDocumentationRule : ValidationRule<ExternalDocumentation> (source)

Functions

Link copied to clipboard
Link copied to clipboard
fun <R : ValidationRule<ExternalDocumentation>> R.either(vararg option: ExternalDocumentation): R

Validate that the element should be equal to one of the elements in option given that it is set.

Link copied to clipboard
fun <R : ValidationRule<ExternalDocumentation>> R.exactly(value: ExternalDocumentation): R

Validate that the element should be equal to value given that it is set.

Link copied to clipboard
fun <R : ValidationRule<ExternalDocumentation>> R.given(precondition: (ExternalDocumentation?) -> Boolean, rule: R.() -> R): R

Validate rule only if precondition evaluates to true.

Link copied to clipboard
fun <R : ValidationRule<ExternalDocumentation>> R.holds(message: (ExternalDocumentation?) -> String = { "Was supposed to hold for '$it' but did not" }, predicate: (ExternalDocumentation?) -> Boolean): R

Validate that predicate evaluates to true.

Link copied to clipboard
fun <R : ValidationRule<ExternalDocumentation>> R.not(message: String, rule: R.() -> R): R

Validate that the rule does not hold.

Link copied to clipboard
fun <V, R : ValidationRule<ExternalDocumentation>> R.optional(value: (ExternalDocumentation?) -> V?, rule: R.() -> R): R

Validate rule only if the evaluated result of value is not null.

Link copied to clipboard
fun <R : ValidationRule<ExternalDocumentation>> R.required(): R

Validate that the element is set.

Link copied to clipboard
fun <R : ValidationRule<ExternalDocumentation>> R.since(date: LocalDate, rule: R.() -> R): R

Validate rule only if date has been in the past.

Link copied to clipboard
fun <R : ValidationRule<ExternalDocumentation>> R.unspecified(): R

Validate that the element is not set.

Link copied to clipboard
fun url(description: String = "", rule: URLRule.() -> URLRule): ExternalDocumentationRule
Link copied to clipboard
fun validate(fixture: ExternalDocumentation?): ValidationResult

Execute the given rule(s) on the fixture.