contracts

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fluent

func Fluent[T any](t *testing.T) fluent.IFluent[T, IComparable[T]]

Types

type Additional

type Additional[T any] struct {
	*Comparable[T]
}

func (*Additional[T]) And

func (s *Additional[T]) And() IComparable[T]

type Comparable

type Comparable[T any] struct {
	*Testable[T]
}

func (*Comparable[T]) BeOfType

func (s *Comparable[T]) BeOfType(typeName reflect.Type) f.IAdditional[T, IComparable[T]]

func (*Comparable[T]) HaveAllFieldsWithTag

func (s *Comparable[T]) HaveAllFieldsWithTag(tagName string) f.IAdditional[T, IComparable[T]]

func (*Comparable[T]) HaveAllOfMembers

func (s *Comparable[T]) HaveAllOfMembers(membersNames []string) f.IAdditional[T, IComparable[T]]

func (*Comparable[T]) HaveAnyOfMembers

func (s *Comparable[T]) HaveAnyOfMembers(membersNames []string) f.IAdditional[T, IComparable[T]]

func (*Comparable[T]) HaveField

func (s *Comparable[T]) HaveField(fieldName string) f.IAdditional[T, IComparable[T]]

func (*Comparable[T]) HaveFieldWithTag

func (s *Comparable[T]) HaveFieldWithTag(fieldName string, tagName string) f.IAdditional[T, IComparable[T]]

func (*Comparable[T]) HaveMember

func (s *Comparable[T]) HaveMember(memberName string) f.IAdditional[T, IComparable[T]]

func (*Comparable[T]) HaveMethod

func (s *Comparable[T]) HaveMethod(methodName string) f.IAdditional[T, IComparable[T]]

func (*Comparable[T]) NotBeOfType

func (s *Comparable[T]) NotBeOfType(typeName reflect.Type) f.IAdditional[T, IComparable[T]]

type FluentT

type FluentT[T any] struct {
	// contains filtered or unexported fields
}

func (*FluentT[T]) It

func (s *FluentT[T]) It(subject T) fluent.ISubject[T, IComparable[T]]

type IComparable

type IComparable[T any] interface {
	fluent.IComparable[T]
	BeOfType(typeName reflect.Type) fluent.IAdditional[T, IComparable[T]]
	NotBeOfType(typeName reflect.Type) fluent.IAdditional[T, IComparable[T]]
	HaveMember(memberName string) fluent.IAdditional[T, IComparable[T]]
	HaveField(fieldName string) fluent.IAdditional[T, IComparable[T]]
	HaveFieldWithTag(fieldName string, tagName string) fluent.IAdditional[T, IComparable[T]]
	HaveAllFieldsWithTag(tagName string) fluent.IAdditional[T, IComparable[T]]
	HaveMethod(methodName string) fluent.IAdditional[T, IComparable[T]]
	HaveAnyOfMembers(membersNames []string) fluent.IAdditional[T, IComparable[T]]
	HaveAllOfMembers(membersNames []string) fluent.IAdditional[T, IComparable[T]]
}

type Subject

type Subject[T any] struct {
	*Testable[T]
}

func (*Subject[T]) Should

func (s *Subject[T]) Should() IComparable[T]

type Testable

type Testable[T any] struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL