Documentation ¶
Overview ¶
Package assist contains testing helpers but for initialization.
Because of that, that type of funcs cannot contain *t testing.T arg on any function, so the errs are notified by log.Fatal (due every bad initialization causes bad processing).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeJsonnet ¶
func DecodeJsonnet(name string, pointer interface{})
DecodeJsonnet will load the specified fixture and decode onto the given pointer It'll add the boilerplate of testdata/%s.jsonnet
func ReadJsonnet ¶
ReadJsonnet reads the jsonnet given from the specified file It'll add the boilerplate of testdata/%s.jsonnet
Types ¶
type ExecStubber ¶
ExecStubber is the actor which performs stubs of db.Exec()
func (*ExecStubber) Stub ¶
func (exec *ExecStubber) Stub(mock sqlmock.Sqlmock) *sqlmock.ExpectedExec
Stub stubs the execution with the given mock It uses .Err to provide connection errs, and Result to stub the desired output on caller
type QueryStubber ¶
QueryStubber is the actor which performs stubs of db.Query()
func (*QueryStubber) Stub ¶
func (query *QueryStubber) Stub(mock sqlmock.Sqlmock) *sqlmock.ExpectedQuery
Stub stubs the query with the given mock It uses .Err to provide connection errs, and Rows to stub the desired output on caller