Documentation ¶
Index ¶
- func ArrayContains(array interface{}, s interface{}) bool
- func DeepEquals(a, b interface{}) bool
- func Equal(t *testing.T, expected, actual interface{}, msgAndArgs ...interface{})
- func EqualValuesWithoutOrder(t *testing.T, a, b interface{}, msgAndArgs ...interface{})
- func Error(t *testing.T, err error, msg ...interface{})
- func NoError(t *testing.T, err error, msg ...interface{})
- func NotEmpty(t *testing.T, i interface{}, msg ...interface{})
- func NotNil(t *testing.T, i interface{}, msg ...interface{})
- func SetupPG(t *testing.T, bootstrapFunc ...test.Bootstrapf) (*test.FakeTransaction, cache.Store)
- func SetupPGWithFactory(t *testing.T, bootstrapFunc ...test.Bootstrapf) (*test.FakeTransaction, *database.DBConnectionFactory, cache.Store)
- type SqlExecutorMock
- func (s *SqlExecutorMock) Delete(list ...interface{}) (int64, error)
- func (s *SqlExecutorMock) Exec(query string, args ...interface{}) (sql.Result, error)
- func (s *SqlExecutorMock) Get(i interface{}, keys ...interface{}) (interface{}, error)
- func (s *SqlExecutorMock) Insert(list ...interface{}) error
- func (s SqlExecutorMock) LastQuery() SqlExecutorMockQuery
- func (s *SqlExecutorMock) Query(query string, args ...interface{}) (*sql.Rows, error)
- func (s *SqlExecutorMock) QueryRow(query string, args ...interface{}) *sql.Row
- func (s *SqlExecutorMock) Select(i interface{}, query string, args ...interface{}) ([]interface{}, error)
- func (s *SqlExecutorMock) SelectFloat(query string, args ...interface{}) (float64, error)
- func (s *SqlExecutorMock) SelectInt(query string, args ...interface{}) (int64, error)
- func (s *SqlExecutorMock) SelectNullFloat(query string, args ...interface{}) (sql.NullFloat64, error)
- func (s *SqlExecutorMock) SelectNullInt(query string, args ...interface{}) (sql.NullInt64, error)
- func (s *SqlExecutorMock) SelectNullStr(query string, args ...interface{}) (sql.NullString, error)
- func (s *SqlExecutorMock) SelectOne(holder interface{}, query string, args ...interface{}) error
- func (s *SqlExecutorMock) SelectStr(query string, args ...interface{}) (string, error)
- func (s *SqlExecutorMock) Update(list ...interface{}) (int64, error)
- func (s *SqlExecutorMock) UpdateColumns(columnFilter gorp.ColumnFilter, list ...interface{}) (int64, error)
- func (s *SqlExecutorMock) WithContext(ctx context.Context) gorp.SqlExecutor
- type SqlExecutorMockQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrayContains ¶
func ArrayContains(array interface{}, s interface{}) bool
ArrayContains check if an element exists in an array using DeepEquals function
func DeepEquals ¶
func DeepEquals(a, b interface{}) bool
DeepEquals returns equality between 2 elements using github.com/fsamin/go-dump
func EqualValuesWithoutOrder ¶
EqualValuesWithoutOrder checks equality between two slices without respecting slide order
func SetupPG ¶
func SetupPG(t *testing.T, bootstrapFunc ...test.Bootstrapf) (*test.FakeTransaction, cache.Store)
SetupPG setup PG DB for test and use gorpmapping singleton's mapper.
func SetupPGWithFactory ¶
func SetupPGWithFactory(t *testing.T, bootstrapFunc ...test.Bootstrapf) (*test.FakeTransaction, *database.DBConnectionFactory, cache.Store)
Types ¶
type SqlExecutorMock ¶
type SqlExecutorMock struct { Queries []SqlExecutorMockQuery OnSelect func(i interface{}) }
func (*SqlExecutorMock) Delete ¶
func (s *SqlExecutorMock) Delete(list ...interface{}) (int64, error)
func (*SqlExecutorMock) Exec ¶
func (s *SqlExecutorMock) Exec(query string, args ...interface{}) (sql.Result, error)
func (*SqlExecutorMock) Get ¶
func (s *SqlExecutorMock) Get(i interface{}, keys ...interface{}) (interface{}, error)
func (*SqlExecutorMock) Insert ¶
func (s *SqlExecutorMock) Insert(list ...interface{}) error
func (SqlExecutorMock) LastQuery ¶
func (s SqlExecutorMock) LastQuery() SqlExecutorMockQuery
func (*SqlExecutorMock) Query ¶
func (s *SqlExecutorMock) Query(query string, args ...interface{}) (*sql.Rows, error)
func (*SqlExecutorMock) QueryRow ¶
func (s *SqlExecutorMock) QueryRow(query string, args ...interface{}) *sql.Row
func (*SqlExecutorMock) Select ¶
func (s *SqlExecutorMock) Select(i interface{}, query string, args ...interface{}) ([]interface{}, error)
func (*SqlExecutorMock) SelectFloat ¶
func (s *SqlExecutorMock) SelectFloat(query string, args ...interface{}) (float64, error)
func (*SqlExecutorMock) SelectInt ¶
func (s *SqlExecutorMock) SelectInt(query string, args ...interface{}) (int64, error)
func (*SqlExecutorMock) SelectNullFloat ¶
func (s *SqlExecutorMock) SelectNullFloat(query string, args ...interface{}) (sql.NullFloat64, error)
func (*SqlExecutorMock) SelectNullInt ¶
func (s *SqlExecutorMock) SelectNullInt(query string, args ...interface{}) (sql.NullInt64, error)
func (*SqlExecutorMock) SelectNullStr ¶
func (s *SqlExecutorMock) SelectNullStr(query string, args ...interface{}) (sql.NullString, error)
func (*SqlExecutorMock) SelectOne ¶
func (s *SqlExecutorMock) SelectOne(holder interface{}, query string, args ...interface{}) error
func (*SqlExecutorMock) SelectStr ¶
func (s *SqlExecutorMock) SelectStr(query string, args ...interface{}) (string, error)
func (*SqlExecutorMock) Update ¶
func (s *SqlExecutorMock) Update(list ...interface{}) (int64, error)
func (*SqlExecutorMock) UpdateColumns ¶
func (s *SqlExecutorMock) UpdateColumns(columnFilter gorp.ColumnFilter, list ...interface{}) (int64, error)
func (*SqlExecutorMock) WithContext ¶
func (s *SqlExecutorMock) WithContext(ctx context.Context) gorp.SqlExecutor
type SqlExecutorMockQuery ¶
type SqlExecutorMockQuery struct { Query string Args []interface{} }
Click to show internal directories.
Click to hide internal directories.