Validatable

fun <T> Validatable(value: T): Validatable<T>

Instantiates a Validatable with a value, allowing to test custom constraints.

Usage example:

fun Validatable<String>.hasWordCountGreaterThan(count: Int) =
constrain { it.split(" ").size count }

@Test
fun testWordCount() {
assertFalse(Validatable("one two").hasWordCountGreaterThan(2).satisfied)
assertTrue(Validatable("one two three").hasWordCountGreaterThan(2).satisfied)
}