0.34.0 Stalwart Blossom
- Adds
propertiesAreEqualToIgnoringassertion. - Adds
isSameInstantassertion for date/time types.
propertiesAreEqualToIgnoring assertion.isSameInstant assertion for date/time types.
doesNotContainKey and doesNotContainKeys map assertions
strikt-gradle module as classpath isolation is problematic with Kotlin 1.5 and the gradleTestKit dependency.Assertion.Builder<T>.subject : T property for accessing the subject value.
IncompleteAssertion.toString of exceptions thrown by Strikt assertions.strikt-arrow to support recent changes in the Arrow library.
isContainedIn assertion.
strikt-jvm module.strikt-java-time module (use strikt-jvm instead).isSorted assertion for Iterable<Comparable<*>>.isSorted(Comparator) so that it applies to Iterable<*> rather than Collection<*>.
Try type that has been removed from arrow-core.anyIndexed, allIndexed, and noneIndexed assertions for Iterable<*>.
count() and count(predicate) mappings for Iterable subjects.File subjects. See #230
Assertion.Builder<File>.parentFile: Builder<File>Assertion.Builder<File>.lastModified: LongAssertion.Builder<File>.length: LongAssertion.Builder<File>.childFiles: Builder<List<File>>Assertion.Builder<File>.childFile(name): Builder<File>Assertion.Builder<File>.exists()Assertion.Builder<File>.notExists()Assertion.Builder<File>.isRegularFile()Assertion.Builder<File>.isNotRegularFile()Assertion.Builder<File>.isDirectory()Assertion.Builder<File>.isNotDirectory()Assertion.Builder<File>.isReadable()Assertion.Builder<File>.isNotReadable()Assertion.Builder<File>.isWritable()Assertion.Builder<File>.isNotWritable()Assertion.Builder<File>.isExecutable()Assertion.Builder<File>.isNotExecutable()
Kotlin 1.4 compatibility
Assertion.Builder<Iterable<E>>withFirstAssertion.Builder<Iterable<E>>withFirst(predicate)Assertion.Builder<Iterable<E>>withLastAssertion.Builder<Iterable<E>>withElementAtAssertion.Builder<Map<K, V>>withValueAssertion.Builder<CapturingSlot<T>>withCaptured in strikt-mockk.
strikt-mockk module.
Assertion.Builder<Iterable<T>>.elementAtAssertion.Builder<Iterable<T>>.oneAssertion.Builder<ArrayNode>.findValuesAsTextAssertion.Builder<ArrayNode>.textValues
com.christophsturm:filepeek
IllegalArgumentException on compose when prior assertions have failed because the subject is the wrong type. See #194
Re-release of v0.23.0 following broken release
with function for performing blocks of assertions on a derived subject. See #117expectThat override that accepts a lambda is now Unit rather than returning Assertion.Builder. See #190
Either, Try and Option types.
and (see #176)
succeeded().failed().
runCatching and Result<T>.describedAs that accepts a lambda.
Assertion.Builder<Iterable<*>>.contains to pass if the argument is an empty list/varargs.Assertion.Builder<Iterable<*>>.containsExactly
Added strikt.gradle module with some support for testing Gradle's API.
java.io.File and java.nio.file.PathResponseEntity class.
Fixes issues with bom publication.
Packages a BOM for aligning strikt versions.
Suppresses internal stack frames from exceptions to make it easier to determine where the assertion was raised.
Assertion.Builder<ClosedRange>.endsWith(Char) for Assertion.Builder<CharSequence>.
getValue assertion/mapping for Assertion.Builder<Map<*, *>>.
not that accepts a block.
get is runtime type safe. It's now a no-op when preceded by a failing type-narrowing assertion.
Added atLeat, atMost and exactly assertions for iterables.
Extends strikt-jackson module with further assertion and mapping functions:
hasNodeType(JsonNodeType)isMissing()textValue()numberValue()booleanValue()
Adds strikt-jackson module.
Adds isPresent and isAbsent assertions for java.util.Optional along with toNullable mapping function.
Fixes isSorted when used in a block.
Adds filter, filterNot and filterIsInstance functions for Assertion.Builder<Iterable<*>>
expectThrows is un-deprecated.isBefore and isAfter in strikt-java-time now support ZonedDateTime.
Assertion.Builder<Collection<*>.isSortedisEqualTo now has special handling for arrays that compares content using contentEquals.
java.time types moved from strikt-core to new strikt-java-time module.Assertion.Builder<Map<*, *>>.isNotEmptyAssertion.Builder<Array<*>>.toListAssertion.Builder<CharSequence>.trimAssertion.Builder<String>.trim
is(Not)(NullOr)(Empty|Blank) assertions.
get to use a receiver rather than a parameter.first(predicate) and flatMap mapping extensions for iterable subjects.
chain in favor of new get method.
isIn assertion.
Fixes broken dependency declaration in strikt-protobuf.
Breaking change renaming map to chain in order to allow a map method that applies to Assertion.Builder<Iterable<*>>.
assertThrows(() -> Unit) use assertThat(catching(() -> Unit))Assertion.Builder<Throwable?> instead of Assertion.Builder<() -> Unit>