Package-level declarations

Types

Link copied to clipboard
class BranchTestNode(val displayName: String, val nodes: List<TestNode>) : TestNode

A branch test node, i.e. which contains nodes itself.

Link copied to clipboard
class DefaultIterableDynamicNodeWrapper<T : DynamicNode>(list: List<DynamicNode>) : IterableDynamicNodeWrapper<T> , Iterable<DynamicNode>
Link copied to clipboard
interface IterableDynamicNodeWrapper<T : DynamicNode> : Iterable<DynamicNode>
Link copied to clipboard
class LeafTestNode<TestExecutableT : TestExecutable>(val displayName: String, val executable: TestExecutableT.() -> Unit) : TestNode

A leaf test node consisting of a displayName and the executable which represents the test as such.

Link copied to clipboard
expect abstract class PlatformTestNode

Note, this type only exists because Kotlin does not allow yet to have a generic type with a fixed type parameter on the RHS of an actual typealias such as actual typealias PlatformTestNodeContainer = Iterable<DynamicNode> and because JUnits compatibility check at runtime requires a ParameterizedType. If JUnit would not require it but instead check if a supertype is compliant, then we could just use PlatformTestNodeContainer and type alias it to IterableDynamicNodeWrapper in jvm.

actual abstract class PlatformTestNode
actual typealias PlatformTestNode = DynamicNode
Link copied to clipboard

Note, we only have a type parameter because Kotlin does not allow yet to have a generic type with a fixed type parameter on the RHS of an actual typealias such as actual typealias PlatformTestNodeContainer = Iterable<DynamicNode> and because JUnits compatibility check at runtime requires a ParameterizedType. This is also the reason why we need PlatformTestNode

Link copied to clipboard
interface TestExecutable

Represents a test as such and provides an abstraction over which expectation verb shall be used.

Link copied to clipboard

Represents the contract each TestExecutable implementation has to follow. Not implementing it as well will lead to a ClassCastException at runtime.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FUNCTION])
expect annotation class TestFactory

Annotation which tells the test runner that a test factory is used.

actual typealias TestFactory = Test
actual typealias TestFactory = org.junit.jupiter.api.TestFactory
Link copied to clipboard

Builder to create a hierarchy of TestNodes.

Link copied to clipboard
sealed class TestNode

Represents a platform agnostic test node.

Functions

Link copied to clipboard

Helper function to create TestNodes based on the given setup function.

Link copied to clipboard
Link copied to clipboard

Turns the given testNodes into a platform specific representation such as JUnit's DynamicNode.