assertion

package
v0.72.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallAssertion

func CallAssertion(name string, params ...interface{}) bool

func Contains

func Contains(actualValue interface{}, expValue interface{}) bool

string

func EndsWith

func EndsWith(actualValue interface{}, expValue interface{}) bool

func Equals

func Equals(actualValue interface{}, expValue interface{}) bool

for both String and Numeric

func GetRawJsonResult

func GetRawJsonResult(value interface{}) string

func Greater

func Greater(actualValue interface{}, expValue interface{}) bool

func GreaterOrEquals

func GreaterOrEquals(actualValue interface{}, expValue interface{}) bool

func Has

func Has(actualValue interface{}, expValue interface{}) bool

func HasMapKey

func HasMapKey(actualValue interface{}, expValue interface{})

special cases for map: map has key

func In

func In(actualValue interface{}, expValue interface{}) bool

In, NotIn, Has, NotHas, for item in item slice

func IsNotNull

func IsNotNull(actualValue interface{}, expValue interface{})

has key but value is not null

func IsNull

func IsNull(actualValue interface{}, expValue interface{})

has key but value is null

func Less

func Less(actualValue interface{}, expValue interface{}) bool

float

func LessOrEquals

func LessOrEquals(actualValue interface{}, expValue interface{}) bool

func Match

func Match(actualValue interface{}, expPattern interface{}) bool

for regrex

func NotEquals

func NotEquals(actualValue interface{}, expValue interface{}) bool

func NotHas

func NotHas(actualValue interface{}, expValue interface{}) bool

func NotHasMapKey

func NotHasMapKey(actualValue interface{}, expValue interface{})

func NotIn

func NotIn(actualValue interface{}, expValue interface{}) bool

func StartsWith

func StartsWith(actualValue interface{}, expValue interface{}) bool

func ValidateCallName

func ValidateCallName(name string) bool

func ValidateCallParams

func ValidateCallParams(name string, params []interface{}) bool

Types

type AssertionDetails

type AssertionDetails struct {
	AssertionKey  string
	AssertionFunc interface{} // function
	ApplyTypes    []string    // [string, number, bool]
}

Jump to

Keyboard shortcuts

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