Documentation ¶
Index ¶
- Constants
- func AssertMockFullFilled(t *testing.T, mocks ...*mock.Mock) bool
- func ExecInBasePath(baseName string)
- func GetStringOfLength(containChars string, length int) string
- func NewSQLXMocked() (sqlmock.Sqlmock, *sqlx.DB)
- func ResetMock(m *mock.Mock)
- func ResetMocks(mocks ...*mock.Mock)
- func ShouldBeEquivalent(actual interface{}, expected ...interface{}) string
- func ShouldBeFullFilled(actual interface{}, _ ...interface{}) string
- func ShouldBeLikeError(actual interface{}, expected ...interface{}) string
Constants ¶
View Source
const ( LowerLetterCasedString = "abcdefghijklmnopqrstuvwxyz" UpperLetterCasedString = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" Symbols = "*/-+$¤£%ù*μ!§~#{'([-|`_\\]°)}´®†‹><²" NumberOnlyString = "0123456789" LettersOnlyString = LowerLetterCasedString + UpperLetterCasedString LowerCasedString = LowerLetterCasedString + Symbols + NumberOnlyString UpperCasedString = UpperLetterCasedString + Symbols + NumberOnlyString String = LowerLetterCasedString + UpperLetterCasedString + Symbols + NumberOnlyString + LettersOnlyString )
nolint:lll
Variables ¶
This section is empty.
Functions ¶
func AssertMockFullFilled ¶
AssertMockFullFilled check list of mock to ensure all defined expectations are meet
func ExecInBasePath ¶
func ExecInBasePath(baseName string)
ExecInBasePath move path up to first matching part ex: in path /usr/test/gitlab/platform/goCore/test ExecInBasePath(goCore) will move to /usr/test/gitlab/platform/goCore ExecInBasePath(test) will move to /usr/test
func GetStringOfLength ¶
Get random string of asked length Provided character list to use to generate string
Provided charsets:
LowerLetterCasedString = "abcdefghijklmnopqrstuvwxyz" UpperLetterCasedString = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" Symbols = "*/-+$¤£%ù*μ!§~#{'([-|`_\\]°)}´®†‹><²" NumberOnlyString = "0123456789" LettersOnlyString = LowerLetterCasedString + UpperLetterCasedString LowerCasedString = LowerLetterCasedString + Symbols + NumberOnlyString UpperCasedString = UpperLetterCasedString + Symbols + NumberOnlyString String = LowerLetterCasedString + UpperLetterCasedString + Symbols + NumberOnlyString + LettersOnlyString
func ResetMocks ¶
ResetMocks reset assertions for provided mock list
func ShouldBeEquivalent ¶
func ShouldBeEquivalent(actual interface{}, expected ...interface{}) string
nolint: gomnd
func ShouldBeFullFilled ¶
func ShouldBeFullFilled(actual interface{}, _ ...interface{}) string
Assert provided DB/testify mock is full filled
func ShouldBeLikeError ¶
func ShouldBeLikeError(actual interface{}, expected ...interface{}) string
Assert errors looks alike using goerrors.Is method
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.