ClassesShould
Fluent API for defining assertion rules on Kotlin classes.
Functions
Asserts that all member functions in selected classes satisfy the assertions specified in the block.
Asserts that all of the nested assertion blocks are satisfied.
Asserts that all member properties in selected classes satisfy the assertions specified in the block.
Asserts that selected classes are annotated with the specified annotation. Matches either the annotation's simple name or its FQN.
Asserts that classes have annotation type parameter T.
Asserts that classes have the specified annotation class.
Asserts that selected classes are annotated with all of the specified annotations.
Asserts that selected classes are annotated with the specified annotation. Matches either simple names or FQNs.
Asserts that classes have all of the specified annotations.
Asserts that selected classes are annotated with any of the specified annotations.
Asserts that selected classes are annotated with the specified annotation. Matches either simple names or FQNs.
Asserts that classes have any of the specified annotations.
Asserts that at least one of the nested assertion blocks is satisfied.
Asserts that selected classes are abstract classes.
Asserts that selected classes are assignable from the specified subtype.
Asserts that selected classes extend or implement specified supertype.
Asserts that selected classes are assignable to all of the specified supertypes.
Asserts that selected classes are assignable to specified supertype.
Asserts that classes are assignable to all of the specified superTypes.
Asserts that selected classes are assignable to any of the specified supertypes.
Asserts that selected classes are assignable to specified supertype.
Asserts that classes are assignable to any of the specified superTypes.
Asserts that selected classes are data classes.
Asserts that selected classes have KDoc documentation.
Asserts that selected classes are enum classes.
Asserts that selected classes are free of dependency cycles.
Asserts that selected classes are inline/value classes.
Asserts that selected classes are inner classes.
Asserts that selected classes are interface definitions.
Filter or assertion criteria for be internal.
Asserts that selected classes are nested classes.
Asserts that selected classes are open classes.
Filter or assertion criteria for be private.
Filter or assertion criteria for be protected.
Filter or assertion criteria for be public.
Asserts that selected classes are sealed.
Asserts that selected classes are top-level classes.
Filter or assertion criteria for contain function.
Filter or assertion criteria for contain functions.
Filter or assertion criteria for contain properties.
Filter or assertion criteria for contain property.
Asserts that selected classes have the specified modifier.
Asserts that selected classes have all of the specified modifiers.
Asserts that selected classes have the specified annotation with a matching argument name and value.
Asserts that classes have an annotation annotation with argument argName equal to argValue.
Asserts that selected classes have the specified modifier.
Asserts that selected classes have at least one of the specified modifiers.
Asserts that selected classes have specified visibility.
Asserts that selected classes have any of the specified visibilities.
Asserts that selected classes have specified modifier.
Asserts that selected classes have specified visibility.
Asserts that selected classes reside in any module matching the specified paths.
Asserts that selected classes reside in a module matching the specified path.
Asserts that selected classes reside in any module matching the specified paths.
Asserts that selected classes reside in packages matching any of the specified patterns. Supports .. segment wildcards.
Asserts that selected classes reside in packages matching the specified predicate.
Asserts that selected classes reside in packages matching the specified pattern. Supports .. segment wildcards.
Asserts that selected classes reside in the package of the specified type.
Filter or assertion criteria for named.
Asserts that selected classes have simple names matching the specified predicate.
Asserts that selected classes have simple names ending with any of the specified suffixes.
Asserts that selected classes have simple names ending with the specified suffix.
Asserts that selected classes have simple names matching any of the specified glob patterns. Supports '*' wildcards.
Asserts that selected classes have simple names matching the specified glob pattern. Supports '*' wildcards.
Asserts that selected classes have simple names starting with any of the specified prefixes.
Asserts that selected classes have simple names starting with the specified prefix.
Asserts that none of the nested assertion blocks are satisfied.
Filter or assertion criteria for not be abstract.
Asserts that selected classes are not accessed by any class residing in packages matching the specified patterns.
Asserts that selected classes are not accessed by any class residing in packages matching the specified pattern.
Filter or assertion criteria for not be data.
Filter or assertion criteria for not be inline.
Filter or assertion criteria for not be inner.
Filter or assertion criteria for not be interface.
Filter or assertion criteria for not be open.
Filter or assertion criteria for not be sealed.
Fails for every invocation of type T in the selected class.
Asserts that selected classes do not contain dependency cycles. Alias for beFreeOfCycles.
Filter or assertion criteria for not contain function.
Filter or assertion criteria for not contain functions.
Filter or assertion criteria for not contain properties.
Filter or assertion criteria for not contain property.
Asserts that classes do not depend on class type parameter T.
Asserts that selected classes do not depend on the specified classes.
Asserts that selected classes do not depend on classes residing in packages matching the specified patterns.
Asserts that selected classes do not depend on classes residing in packages matching the specified pattern.
Asserts that selected classes do not depend on packages matching packagePatterns.
Asserts that selected classes do not depend on packages matching packagePattern.
Filter or assertion criteria for not have modifier.
Asserts that selected classes do not expose types annotated with the specified annotations in their property, function return, or parameter signatures.
Asserts that selected classes do not expose types annotated with the specified annotation in their property, function return, or parameter signatures.
Asserts that selected classes do not expose types annotated with any of the specified annotations in their property, function return, or parameter signatures.
Asserts that selected classes do not reside in any module matching the specified paths.
Asserts that selected classes do not reside in a module matching the specified path.
Asserts that selected classes do not reside in any module matching the specified paths.
Asserts that selected classes do not reside in packages matching any of the specified patterns. Supports .. segment wildcards.
Asserts that selected classes do not reside in packages matching the specified pattern. Supports .. segment wildcards.
Filter or assertion criteria for not named.
Filter or assertion criteria for not name ends with.
Filter or assertion criteria for not name matches.
Filter or assertion criteria for not name starts with.
Fails for every actual class/type use of type T in the selected class; imports alone do not match.
Asserts that selected classes are accessed only by classes residing in packages matching the specified patterns.
Asserts that selected classes are accessed only by classes residing in packages matching the specified pattern.
Asserts that selected classes depend only on classes residing in packages matching the specified patterns.
Asserts that selected classes depend only on classes residing in packages matching the specified pattern.
Asserts that selected classes only depend on packages matching packagePatterns.
Asserts that selected classes only depend on packages matching packagePattern.
Asserts that selected classes satisfy custom assertion assertion.
Satisfies an arbitrary custom assertion logic with custom violations builder.
Asserts that selected classes satisfy custom description description.
Asserts that selected classes satisfy custom predicate predicate with description.
Asserts that selected classes satisfy a custom predicate within a SatisfyContext block identified by id and optional description.
Filter or assertion criteria for simple named.