doc / ch.tutteli.atrium.assertions / AssertionGroup

AssertionGroup

interface AssertionGroup : Assertion

The base interface for Assertion groups, providing a default implementation for Assertion.holds which returns true if all its assertions hold.

Types

Builder

object Builder

Represents a builder for AssertionGroup.

Properties

assertions

abstract val assertions: List<Assertion>

The assertions of this group, which are defined for subject.

name

abstract val name: Translatable

The name of the group.

subject

abstract val subject: Any

The subject for which the assertions are defined.

type

abstract val type: AssertionGroupType

The type of the group, e.g. RootAssertionGroupType.

Functions

holds

open fun holds(): <ERROR CLASS>

Holds if all its assertions hold.

Inheritors

BasicAssertionGroup

data class BasicAssertionGroup : AssertionGroup

A default implementation for AssertionGroup -- it has a certain type, a name, a subject and of course assertions.

EmptyNameAndSubjectAssertionGroup

abstract class EmptyNameAndSubjectAssertionGroup : AssertionGroup

Represents a base class for AssertionGroups which have an empty name and subject.

FixHoldsAssertionGroup

data class FixHoldsAssertionGroup : AssertionGroup

Represents a group of Assertions -- it has a certain type, a name, a subject, assertions and a fixed value for holds which does not depend on assertions (usually indirectly).

LazyThreadUnsafeAssertionGroup

class LazyThreadUnsafeAssertionGroup : AssertionGroup

Represents an AssertionGroup which is evaluated lazily where the lazy loading is not thread safe.