assertion

package
v0.71.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 added in v0.71.2

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 added in v0.71.2

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

has key but value is not null

func IsNull added in v0.71.2

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 added in v0.71.2

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