Skip to content

Add assertions for NonEmptyList<A> type #31

@rcardin

Description

@rcardin

Add assertions for NonEmptyList<A> type. As an example, take a look at the assertions list implemented by Kotest library for such type.

NonEmptyList  
nel.shouldContain(e) Asserts that the NonEmptyList contains the given element e
nel.shouldContainAll(e1,e2,...,en) Asserts that the NonEmptyList contains all the given elements e1,e2,...,en
nel.shouldContainNull() Asserts that the NonEmptyList contains at least one null
nel.shouldContainNoNulls() Asserts that the NonEmptyList contains no nulls
nel.shouldContainOnlyNulls() Asserts that the NonEmptyList contains only nulls or is empty
nel.shouldHaveDuplicates() Asserts that the NonEmptyList has at least one duplicate
nel.shouldBeSingleElement(e) Asserts that the NonEmptyList has a single element which is e
nel.shouldBeSorted() Asserts that the NonEmptyList is sorted

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions