Package-level declarations
Functions
Asserts on each item in the iterable, passing if any of the items pass. The given lambda will be run for each item.
Asserts on each item in the sequence, passing if any of the items pass. The given lambda will be run for each item.
Asserts on each item in the iterable, passing if at least times
items pass. The given lambda will be run for each item.
Asserts on each item in the sequence, passing if at least times
items pass. The given lambda will be run for each item.
Asserts on each item in the iterable, passing if at most times
items pass. The given lambda will be run for each item.
Asserts on each item in the sequence, passing if at most times
items pass. The given lambda will be run for each item.
Asserts the array contains the expected element, using in
.
Asserts the iterable contains the expected element, using in
.
Asserts the map contains the expected key-value pair.
Asserts the sequence contains the expected element, using in
.
Asserts the char sequence contains the expected subsequence(s).
Asserts the char sequence contains the expected subsequence.
Asserts the char sequence contains the expected char sequences.
Asserts the array contains at least the expected elements, in any order. The array may also contain additional elements.
Asserts the iterable contains at least the expected elements, in any order. The collection may also contain additional elements.
Asserts the map contains at least the expected elements. The map may also contain additional elements.
Asserts the sequence contains at least the expected elements, in any order. The collection may also contain additional elements.
Asserts the array contains at least the expected elements, in any order. The array may also contain additional elements.
Asserts the iterable contains at least the expected elements, in any order. The collection may also contain additional elements.
Asserts the map contains at least the expected elements. The map may also contain additional elements.
Asserts the sequence contains at least the expected elements, in any order. The collection may also contain additional elements.
Asserts the array contains exactly the expected elements. They must be in the same order and there must not be any extra elements.
Asserts the list contains exactly the expected elements. They must be in the same order and there must not be any extra elements.
Asserts the sequence contains exactly the expected elements. They must be in the same order and there must not be any extra elements.
Asserts the iterable contains exactly the expected elements, in any order. Each value in expected must correspond to a matching value in actual, and visa-versa.
Asserts the sequence contains exactly the expected elements, in any order. Each value in expected must correspond to a matching value in actual, and visa-versa.
Asserts the char sequence contains a match of the regular expression.
Asserts the collection does not contain any of the expected elements.
Asserts the iterable does not contain any of the expected elements.
Asserts the map does not contain any of the expected elements.
Asserts the sequence does not contain any of the expected elements.
Asserts the array contains only the expected elements, in any order.
Asserts the iterable contains only the expected elements, in any order. Duplicate values in the expected and actual are ignored.
Asserts the map contains only the expected elements. There must not be any extra elements.
Asserts the sequence contains only the expected elements, in any order. Duplicate values in the expected and actual are ignored.
Asserts that a collection contains a subset of items the same order, but may have other items in the list.
Asserts the array does not contain the expected element, using !in
.
Asserts the iterable does not contain the expected element, using !in
.
Asserts the map does not contain the expected key-value pair.
Asserts the sequence does not contain the expected element, using !n
.
Asserts the char sequence does not contain the specified char sequence(s).
Asserts the char sequence does not contain the specified char sequence.
Asserts the char sequence does not contain the specified char sequences.
Asserts the value does not have the expected kotlin class. This is an exact match, so assertThat("test").doesNotHaveClass<String>()
fails but assertThat("test").doesNotHaveClass<Any>()
is successful.
Asserts the value does not have the expected kotlin class. This is an exact match, so assertThat("test").doesNotHaveClass(String::class)
fails but assertThat("test").doesNotHaveClass(Any::class)
is successful.
Asserts on each item in the array. The given lambda will be run for each item.
Asserts on each item in the iterable. The given lambda will be run for each item.
Asserts on each item in the sequence. The given lambda will be run for each item.
Asserts the list ends with the expected elements, in the same order.
Asserts the char sequence ends with the expected char sequence.
Asserts on each item in the iterable, passing if exactly times
items pass. The given lambda will be run for each item.
Asserts on each item in the sequence, passing if exactly times
items pass. The given lambda will be run for each item.
Extracts a value of from each item in the array, allowing you to assert on a list of those values.
Extracts a value of from each item in the iterable, allowing you to assert on a list of those values.
Extracts a value of from each item in the sequence, allowing you to assert on a list of those values.
Extracts two values of from each item in the array, allowing you to assert on a list of paris of those values.
Extracts two values of from each item in the iterable, allowing you to assert on a list of paris of those values.
Extracts two values of from each item in the sequence, allowing you to assert on a list of paris of those values.
Extracts three values from each item in the array, allowing you to assert on a list of triples of those values.
Extracts three values from each item in the iterable, allowing you to assert on a list of triples of those values.
Extracts three values from each item in the sequence, allowing you to assert on a list of triples of those values.
Asserts the value has the expected kotlin class. This is an exact match, so assertThat("test").hasClass<String>()
is successful but assertThat("test").hasClass<Any>()
fails.
Asserts the value has the expected kotlin class. This is an exact match, so assertThat("test").hasClass(String::class)
is successful but assertThat("test").hasClass(Any::class)
fails.
Asserts the file has the expected direct child.
Asserts the file has the expected extension.
Asserts the value has the expected hash code from it's hashCode.
Returns an assert on the hasCode method of the value.
Asserts the char sequence has the expected length.
Asserts the char sequence has the expected number of lines.
Asserts the throwable has the expected message.
Asserts the throwable has no cause.
Asserts that the actual stream has a different content as the expected stream. Both InputStreams will be closed by the assertion.
Asserts the throwable is similar to the expected root cause, checking the type and message.
Asserts that the actual stream has the same content as the expected stream. Both InputStreams will be closed by the assertion.
Asserts the char sequence has the same length as the expected one.
Asserts the array has the same size as the expected array.
Asserts the collection has the same size as the expected collection.
Asserts the map has the same size as the expected map.
Asserts the value has the expected string from it's toString.
Like isEqualTo but reports exactly which properties differ. Only supports data classes. Note: you should not use this if your data class has a custom Any.equals since it can be misleading.
Asserts the file is a directory.
Assert that the path is a directory.
Asserts the array is empty.
Asserts the char sequence is empty.
Asserts the collection is empty.
Asserts the iterable is empty.
Asserts the sequence is empty.
Asserts that value is equal when comparing using {@link Comparable#compareTo(Object)}
.
Asserts that actual.compareTo(BigDecimal(expected) == 0
.
Asserts the value is equal to the expected one, using ==
.
Asserts the array contents are equal to the expected one, using contentDeepEquals.
Asserts the string is equal to the expected string.
Returns an assert that compares all accessible properties except the given properties on the calling class.
Returns an assert that compares only the given properties on the calling class
Assert that the path is an executable.
Asserts the value is greater than the expected value, using >
.
Asserts the value is greater or equal to the expected value, using >=
.
Asserts the value is an instance of the expected kotlin class. Both assertThat("test").isInstanceOf<String>()
and assertThat("test").isInstanceOf<Any>()
are successful.
Asserts the value is an instance of the expected kotlin class. Both assertThat("test").isInstanceOf(String::class)
and assertThat("test").isInstanceOf(Any::class)
are successful.
Asserts the value is less than the expected value, using <
.
Asserts the value is less than or equal to the expected value, using <=
.
Asserts the number is less than 0.
Asserts the array is not empty.
Asserts the char sequence is not empty.
Asserts the collection is not empty.
Asserts the iterable is not empty.
Asserts the sequence is not empty.
Asserts the value is not equal to the expected one, using !=
.
Asserts the array contents are not equal to the expected one, using contentDeepEquals.
Asserts the string is not equal to the expected string.
Asserts the file is not hidden.
Asserts the value is not an instance of the expected kotlin class. Both assertThat("test").isNotInstanceOf<String>()
and assertThat("test").isNotInstanceOf<String>()
fail.
Asserts the value is not an instance of the expected kotlin class. Both assertThat("test").isNotInstanceOf(String::class)
and assertThat("test").isNotInstanceOf(Any::class)
fail.
Asserts the value is not the same as the expected one, using !==
.
Asserts the value is not the same as the expected one, using !==
.
Asserts the array is null or empty.
Asserts the char sequence is null or empty.
Asserts the collection is null or empty.
Asserts the number is greater than 0.
Assert that the path is readable.
Assert that the path is a regular file.
Assert that the path points to the same object as the other path.
Asserts the value is the same as the expected one, using ===
.
Asserts the value is between the expected start and end values, non-inclusive.
Assert that the path is a symbolic link.
Assert that the path is writable link.
Asserts the char sequence matches the expected regular expression.
Asserts the throwable contains the expected text
Asserts on each item in the iterable, passing if none of the items pass. The given lambda will be run for each item.
Asserts on each item in the sequence, passing if none of the items pass. The given lambda will be run for each item.
Returns an assert that asserts on the result of calling the given function.
Returns an assert that asserts on the given property.
Returns an assert that asserts on the given property of the value.
Asserts the list starts with the expected elements, in the same order.
Asserts the char sequence starts with the expected char sequence.
Returns an assert on the toString method of the value.