AssertionBuilder
Represents a builder which creates Assertions and AssertionGroups.
Properties
Builder to create a DescriptiveAssertion -- use it to create a simple assertion consisting of a DescriptiveAssertion.description (such as is less than
) and a DescriptiveAssertion.representation (which most of the time corresponds to the expected value).
Builder to create an ExplanatoryAssertion -- use it to explain something which is typically formatted by an ObjectFormatter -- has to be a child of an ExplanatoryGroup (see explanatoryGroup).
Builder to create an AssertionGroup with a ExplanatoryAssertionGroupType -- such a group is always shown in reporting (a Reporter has to neglect whether the Assertion.holds or not). Use it to provide explanations. It is inter alia used in Iterable contains entries
assertions to describe the identification lambda you used.
Builder to create an AssertionGroup with a FeatureAssertionGroupType -- use it if you want to make an Assertion about a feature of the subject.
Builder to create an AssertionGroup whose AssertionGroup.holds is fixed (not determined based on its AssertionGroup.assertions).
Builder to create an AssertionGroup with an InvisibleAssertionGroupType -- use it only if you have several independent Assertions which should be evaluated together.
Builder to create an AssertionGroup with a ListAssertionGroupType -- kind of the default type for AssertionGroups, if you do not know what to choose, this is probably the best fit for you.
Builder to create an AssertionGroup whose AssertionGroup.holds is a logic AND operation composed by a fixed part and its AssertionGroup.assertions.
Builder to create an RepresentationOnlyAssertion -- typically used within an AssertionGroup where the description of the group gives enough context, so that this assertion does not require an additional description.
Builder to create the root AssertionGroup -- do not use it in assertion functions; this group should only be created by RootExpects.
Builder to create an AssertionGroup with a SummaryAssertionGroupType -- use it if it is essential that also Assertions which hold are shown to a user in reporting. This kind is inter alia used for Iterable contains.inAnyOrder.only
assertions where it quickly gets confusing if you do not see the assertions which hold.
Functions
Creates a DescriptiveAssertion based on the given description, representation and test.
Builder to create a basic AssertionGroup with a custom AssertionGroupType.