0.34.0 Stalwart Blossom
- Adds
propertiesAreEqualToIgnoring
assertion. - Adds
isSameInstant
assertion 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: Long
Assertion.Builder<File>.length: Long
Assertion.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>>withFirst
Assertion.Builder<Iterable<E>>withFirst(predicate)
Assertion.Builder<Iterable<E>>withLast
Assertion.Builder<Iterable<E>>withElementAt
Assertion.Builder<Map<K, V>>withValue
Assertion.Builder<CapturingSlot<T>>withCaptured
in strikt-mockk.
strikt-mockk
module.
Assertion.Builder<Iterable<T>>.elementAt
Assertion.Builder<Iterable<T>>.one
Assertion.Builder<ArrayNode>.findValuesAsText
Assertion.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.Path
ResponseEntity
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<*>.isSorted
isEqualTo
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<*, *>>.isNotEmpty
Assertion.Builder<Array<*>>.toList
Assertion.Builder<CharSequence>.trim
Assertion.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>