assertions

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assertions

type Assertions struct {
	// contains filtered or unexported fields
}

func New

func New(t assert.TestingT) *Assertions

func (*Assertions) Condition

func (a *Assertions) Condition(comp assert.Comparison, msgAndArgs ...interface{}) bool

func (*Assertions) Conditionf

func (a *Assertions) Conditionf(comp assert.Comparison, msg string, args ...interface{}) bool

func (*Assertions) Contains

func (a *Assertions) Contains(s interface{}, contains interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) Containsf

func (a *Assertions) Containsf(s interface{}, contains interface{}, msg string, args ...interface{}) bool

func (*Assertions) DirExists

func (a *Assertions) DirExists(path string, msgAndArgs ...interface{}) bool

func (*Assertions) DirExistsf

func (a *Assertions) DirExistsf(path string, msg string, args ...interface{}) bool

func (*Assertions) ElementsMatch

func (a *Assertions) ElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) ElementsMatchf

func (a *Assertions) ElementsMatchf(listA interface{}, listB interface{}, msg string, args ...interface{}) bool

func (*Assertions) Empty

func (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) Emptyf

func (a *Assertions) Emptyf(object interface{}, msg string, args ...interface{}) bool

func (*Assertions) Equal

func (a *Assertions) Equal(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) EqualError

func (a *Assertions) EqualError(theError error, errString string, msgAndArgs ...interface{}) bool

func (*Assertions) EqualErrorf

func (a *Assertions) EqualErrorf(theError error, errString string, msg string, args ...interface{}) bool

func (*Assertions) EqualValues

func (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) EqualValuesf

func (a *Assertions) EqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool

func (*Assertions) Equalf

func (a *Assertions) Equalf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool

func (*Assertions) Error

func (a *Assertions) Error(err error, msgAndArgs ...interface{}) bool

func (*Assertions) ErrorAs

func (a *Assertions) ErrorAs(err error, target interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) ErrorAsf

func (a *Assertions) ErrorAsf(err error, target interface{}, msg string, args ...interface{}) bool

func (*Assertions) ErrorContains

func (a *Assertions) ErrorContains(theError error, contains string, msgAndArgs ...interface{}) bool

func (*Assertions) ErrorContainsf

func (a *Assertions) ErrorContainsf(theError error, contains string, msg string, args ...interface{}) bool

func (*Assertions) ErrorIs

func (a *Assertions) ErrorIs(err error, target error, msgAndArgs ...interface{}) bool

func (*Assertions) ErrorIsf

func (a *Assertions) ErrorIsf(err error, target error, msg string, args ...interface{}) bool

func (*Assertions) Errorf

func (a *Assertions) Errorf(err error, msg string, args ...interface{}) bool

func (*Assertions) Eventually

func (a *Assertions) Eventually(condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool

func (*Assertions) Eventuallyf

func (a *Assertions) Eventuallyf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool

func (*Assertions) Exactly

func (a *Assertions) Exactly(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) Exactlyf

func (a *Assertions) Exactlyf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool

func (*Assertions) Fail

func (a *Assertions) Fail(failureMessage string, msgAndArgs ...interface{}) bool

func (*Assertions) FailNow

func (a *Assertions) FailNow(failureMessage string, msgAndArgs ...interface{}) bool

func (*Assertions) FailNowf

func (a *Assertions) FailNowf(failureMessage string, msg string, args ...interface{}) bool

func (*Assertions) Failf

func (a *Assertions) Failf(failureMessage string, msg string, args ...interface{}) bool

func (*Assertions) False

func (a *Assertions) False(value bool, msgAndArgs ...interface{}) bool

func (*Assertions) Falsef

func (a *Assertions) Falsef(value bool, msg string, args ...interface{}) bool

func (*Assertions) FileExists

func (a *Assertions) FileExists(path string, msgAndArgs ...interface{}) bool

func (*Assertions) FileExistsf

func (a *Assertions) FileExistsf(path string, msg string, args ...interface{}) bool

func (*Assertions) Greater

func (a *Assertions) Greater(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) GreaterOrEqual

func (a *Assertions) GreaterOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) GreaterOrEqualf

func (a *Assertions) GreaterOrEqualf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool

func (*Assertions) Greaterf

func (a *Assertions) Greaterf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool

func (*Assertions) HTTPBodyContains

func (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) HTTPBodyContainsf

func (a *Assertions) HTTPBodyContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool

func (*Assertions) HTTPBodyNotContains

func (a *Assertions) HTTPBodyNotContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) HTTPBodyNotContainsf

func (a *Assertions) HTTPBodyNotContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool

func (*Assertions) HTTPError

func (a *Assertions) HTTPError(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool

func (*Assertions) HTTPErrorf

func (a *Assertions) HTTPErrorf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool

func (*Assertions) HTTPRedirect

func (a *Assertions) HTTPRedirect(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool

func (*Assertions) HTTPRedirectf

func (a *Assertions) HTTPRedirectf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool

func (*Assertions) HTTPStatusCode

func (a *Assertions) HTTPStatusCode(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msgAndArgs ...interface{}) bool

func (*Assertions) HTTPStatusCodef

func (a *Assertions) HTTPStatusCodef(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{}) bool

func (*Assertions) HTTPSuccess

func (a *Assertions) HTTPSuccess(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool

func (*Assertions) HTTPSuccessf

func (a *Assertions) HTTPSuccessf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool

func (*Assertions) Implements

func (a *Assertions) Implements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) Implementsf

func (a *Assertions) Implementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool

func (*Assertions) InDelta

func (a *Assertions) InDelta(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool

func (*Assertions) InDeltaMapValues

func (a *Assertions) InDeltaMapValues(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool

func (*Assertions) InDeltaMapValuesf

func (a *Assertions) InDeltaMapValuesf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool

func (*Assertions) InDeltaSlice

func (a *Assertions) InDeltaSlice(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool

func (*Assertions) InDeltaSlicef

func (a *Assertions) InDeltaSlicef(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool

func (*Assertions) InDeltaf

func (a *Assertions) InDeltaf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool

func (*Assertions) InEpsilon

func (a *Assertions) InEpsilon(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool

func (*Assertions) InEpsilonSlice

func (a *Assertions) InEpsilonSlice(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool

func (*Assertions) InEpsilonSlicef

func (a *Assertions) InEpsilonSlicef(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool

func (*Assertions) InEpsilonf

func (a *Assertions) InEpsilonf(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool

func (*Assertions) IsDecreasing

func (a *Assertions) IsDecreasing(object interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) IsDecreasingf

func (a *Assertions) IsDecreasingf(object interface{}, msg string, args ...interface{}) bool

func (*Assertions) IsIncreasing

func (a *Assertions) IsIncreasing(object interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) IsIncreasingf

func (a *Assertions) IsIncreasingf(object interface{}, msg string, args ...interface{}) bool

func (*Assertions) IsNonDecreasing

func (a *Assertions) IsNonDecreasing(object interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) IsNonDecreasingf

func (a *Assertions) IsNonDecreasingf(object interface{}, msg string, args ...interface{}) bool

func (*Assertions) IsNonIncreasing

func (a *Assertions) IsNonIncreasing(object interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) IsNonIncreasingf

func (a *Assertions) IsNonIncreasingf(object interface{}, msg string, args ...interface{}) bool

func (*Assertions) IsType

func (a *Assertions) IsType(expectedType interface{}, object interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) IsTypef

func (a *Assertions) IsTypef(expectedType interface{}, object interface{}, msg string, args ...interface{}) bool

func (*Assertions) JSONEq

func (a *Assertions) JSONEq(expected string, actual string, msgAndArgs ...interface{}) bool

func (*Assertions) JSONEqf

func (a *Assertions) JSONEqf(expected string, actual string, msg string, args ...interface{}) bool

func (*Assertions) Len

func (a *Assertions) Len(object interface{}, length int, msgAndArgs ...interface{}) bool

func (*Assertions) Lenf

func (a *Assertions) Lenf(object interface{}, length int, msg string, args ...interface{}) bool

func (*Assertions) Less

func (a *Assertions) Less(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) LessOrEqual

func (a *Assertions) LessOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) LessOrEqualf

func (a *Assertions) LessOrEqualf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool

func (*Assertions) Lessf

func (a *Assertions) Lessf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool

func (*Assertions) Negative

func (a *Assertions) Negative(e interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) Negativef

func (a *Assertions) Negativef(e interface{}, msg string, args ...interface{}) bool

func (*Assertions) Never

func (a *Assertions) Never(condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool

func (*Assertions) Neverf

func (a *Assertions) Neverf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool

func (*Assertions) Nil

func (a *Assertions) Nil(object interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) Nilf

func (a *Assertions) Nilf(object interface{}, msg string, args ...interface{}) bool

func (*Assertions) NoDirExists

func (a *Assertions) NoDirExists(path string, msgAndArgs ...interface{}) bool

func (*Assertions) NoDirExistsf

func (a *Assertions) NoDirExistsf(path string, msg string, args ...interface{}) bool

func (*Assertions) NoError

func (a *Assertions) NoError(err error, msgAndArgs ...interface{}) bool

func (*Assertions) NoErrorf

func (a *Assertions) NoErrorf(err error, msg string, args ...interface{}) bool

func (*Assertions) NoFileExists

func (a *Assertions) NoFileExists(path string, msgAndArgs ...interface{}) bool

func (*Assertions) NoFileExistsf

func (a *Assertions) NoFileExistsf(path string, msg string, args ...interface{}) bool

func (*Assertions) NotContains

func (a *Assertions) NotContains(s interface{}, contains interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) NotContainsf

func (a *Assertions) NotContainsf(s interface{}, contains interface{}, msg string, args ...interface{}) bool

func (*Assertions) NotEmpty

func (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) NotEmptyf

func (a *Assertions) NotEmptyf(object interface{}, msg string, args ...interface{}) bool

func (*Assertions) NotEqual

func (a *Assertions) NotEqual(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) NotEqualValues

func (a *Assertions) NotEqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) NotEqualValuesf

func (a *Assertions) NotEqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool

func (*Assertions) NotEqualf

func (a *Assertions) NotEqualf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool

func (*Assertions) NotErrorIs

func (a *Assertions) NotErrorIs(err error, target error, msgAndArgs ...interface{}) bool

func (*Assertions) NotErrorIsf

func (a *Assertions) NotErrorIsf(err error, target error, msg string, args ...interface{}) bool

func (*Assertions) NotNil

func (a *Assertions) NotNil(object interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) NotNilf

func (a *Assertions) NotNilf(object interface{}, msg string, args ...interface{}) bool

func (*Assertions) NotPanics

func (a *Assertions) NotPanics(f assert.PanicTestFunc, msgAndArgs ...interface{}) bool

func (*Assertions) NotPanicsf

func (a *Assertions) NotPanicsf(f assert.PanicTestFunc, msg string, args ...interface{}) bool

func (*Assertions) NotRegexp

func (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) NotRegexpf

func (a *Assertions) NotRegexpf(rx interface{}, str interface{}, msg string, args ...interface{}) bool

func (*Assertions) NotSame

func (a *Assertions) NotSame(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) NotSamef

func (a *Assertions) NotSamef(expected interface{}, actual interface{}, msg string, args ...interface{}) bool

func (*Assertions) NotSubset

func (a *Assertions) NotSubset(list interface{}, subset interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) NotSubsetf

func (a *Assertions) NotSubsetf(list interface{}, subset interface{}, msg string, args ...interface{}) bool

func (*Assertions) NotZero

func (a *Assertions) NotZero(i interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) NotZerof

func (a *Assertions) NotZerof(i interface{}, msg string, args ...interface{}) bool

func (*Assertions) Panics

func (a *Assertions) Panics(f assert.PanicTestFunc, msgAndArgs ...interface{}) bool

func (*Assertions) PanicsWithError

func (a *Assertions) PanicsWithError(errString string, f assert.PanicTestFunc, msgAndArgs ...interface{}) bool

func (*Assertions) PanicsWithErrorf

func (a *Assertions) PanicsWithErrorf(errString string, f assert.PanicTestFunc, msg string, args ...interface{}) bool

func (*Assertions) PanicsWithValue

func (a *Assertions) PanicsWithValue(expected interface{}, f assert.PanicTestFunc, msgAndArgs ...interface{}) bool

func (*Assertions) PanicsWithValuef

func (a *Assertions) PanicsWithValuef(expected interface{}, f assert.PanicTestFunc, msg string, args ...interface{}) bool

func (*Assertions) Panicsf

func (a *Assertions) Panicsf(f assert.PanicTestFunc, msg string, args ...interface{}) bool

func (*Assertions) Positive

func (a *Assertions) Positive(e interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) Positivef

func (a *Assertions) Positivef(e interface{}, msg string, args ...interface{}) bool

func (*Assertions) Regexp

func (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) Regexpf

func (a *Assertions) Regexpf(rx interface{}, str interface{}, msg string, args ...interface{}) bool

func (*Assertions) Same

func (a *Assertions) Same(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) Samef

func (a *Assertions) Samef(expected interface{}, actual interface{}, msg string, args ...interface{}) bool

func (*Assertions) Subset

func (a *Assertions) Subset(list interface{}, subset interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) Subsetf

func (a *Assertions) Subsetf(list interface{}, subset interface{}, msg string, args ...interface{}) bool

func (*Assertions) True

func (a *Assertions) True(value bool, msgAndArgs ...interface{}) bool

func (*Assertions) Truef

func (a *Assertions) Truef(value bool, msg string, args ...interface{}) bool

func (*Assertions) WithinDuration

func (a *Assertions) WithinDuration(expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) bool

func (*Assertions) WithinDurationf

func (a *Assertions) WithinDurationf(expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) bool

func (*Assertions) WithinRange

func (a *Assertions) WithinRange(actual time.Time, start time.Time, end time.Time, msgAndArgs ...interface{}) bool

func (*Assertions) WithinRangef

func (a *Assertions) WithinRangef(actual time.Time, start time.Time, end time.Time, msg string, args ...interface{}) bool

func (*Assertions) YAMLEq

func (a *Assertions) YAMLEq(expected string, actual string, msgAndArgs ...interface{}) bool

func (*Assertions) YAMLEqf

func (a *Assertions) YAMLEqf(expected string, actual string, msg string, args ...interface{}) bool

func (*Assertions) Zero

func (a *Assertions) Zero(i interface{}, msgAndArgs ...interface{}) bool

func (*Assertions) Zerof

func (a *Assertions) Zerof(i interface{}, msg string, args ...interface{}) bool

Jump to

Keyboard shortcuts

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