testutils

package
v0.0.0-...-71c6e05 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpectAllExportedSet

func ExpectAllExportedSet(t *testing.T, got interface{})

ExpectAllExportedSet expects that all exported fields in the passed struct argument are set.

func ExpectEqual

func ExpectEqual(t *testing.T, got interface{}, exp interface{})

ExpectEqual expects the provided values to be equal.

func ExpectError

func ExpectError(t *testing.T, err error, expContent ...string)

ExpectError checks that the provided error does not equal nil. If additional string arguments were passend, then it is checked that the error message contains all of them.

func ExpectFalse

func ExpectFalse(t *testing.T, v bool)

ExpectFalse expects that the provided boll argument is false.

func ExpectFileExists

func ExpectFileExists(t *testing.T, filename string)

ExpectFileExists expects that the provided file name references an existing file.

func ExpectIsSet

func ExpectIsSet(t *testing.T, got interface{})

ExpectIsSet expects that the provided argument is set.

func ExpectKeyExists

func ExpectKeyExists(t *testing.T, tMap interface{}, key interface{})

ExpectKeyExists expects that the provided key exists in the provided map.

func ExpectNil

func ExpectNil(t *testing.T, got interface{})

ExpectNil expects the provided argument to be nil.

func ExpectNoError

func ExpectNoError(t *testing.T, err error)

ExpectNoError expects that the provided error argument is nil.

func ExpectNotEqual

func ExpectNotEqual(t *testing.T, got interface{}, notExp interface{})

ExpectNotEqual expects the provided values to not be equal.

func ExpectNotNil

func ExpectNotNil(t *testing.T, got interface{})

ExpectNotNil expects the provided argument to not be nil.

func ExpectNotSet

func ExpectNotSet(t *testing.T, got interface{})

ExpectNotSet expects that the provided argument is not set.

func ExpectStringContains

func ExpectStringContains(t *testing.T, got string, exp string)

ExpectStringContains expects that the provided string contains the provided substring.

func ExpectStringContainsNot

func ExpectStringContainsNot(t *testing.T, got string, exp string)

ExpectStringContainsNot expects that the provided string does not contain the provided substring.

func ExpectTrue

func ExpectTrue(t *testing.T, v bool)

ExpectTrue expects that the provided bool argument is true.

Types

This section is empty.

Jump to

Keyboard shortcuts

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