Versions in this module Expand all Collapse all v0 v0.1.0 Aug 27, 2020 Changes in this version + var ErrNotExpected = fmt.Errorf("call is not expected") + func WithSDK(t *testing.T, f func(*testing.T, *api.VK, *TestCase)) + type Expectation struct + ErrorMessage string + ErrorResponse bool + Method string + Params api.Params + Response api.Response + func NewExpectation(method string) *Expectation + func (e *Expectation) Fails(fails bool) *Expectation + func (e *Expectation) Returns(response api.Response) *Expectation + func (e *Expectation) ReturnsBytes(data []byte) *Expectation + func (e *Expectation) ReturnsBytesF(f func() []byte) *Expectation + func (e *Expectation) ReturnsF(f func() api.Response) *Expectation + func (e *Expectation) ReturnsJSON(v interface{}) *Expectation + func (e *Expectation) ReturnsJSONF(f func() interface{}) *Expectation + func (e *Expectation) WithError(message string) *Expectation + func (e *Expectation) WithParams(params api.Params) *Expectation + func (e *Expectation) WithParamsF(f func() api.Params) *Expectation + func (e Expectation) Match(method string, params api.Params) (bool, api.Response, error) + type Expectations []*Expectation + func (stack *Expectations) Pop() (result *Expectation, ok bool) + func (stack *Expectations) Push(element *Expectation) + type TestCase struct + Expectations Expectations + T *testing.T + func CreateSDK(t *testing.T) (*api.VK, *TestCase) + func NewTestCase(t *testing.T) *TestCase + func (test *TestCase) ExpectCall(method string) *Expectation + func (test *TestCase) ExpectationsWereMet() error + func (test *TestCase) Handler() sdkutil.Handler Other modules containing this package github.com/tdakkota/vksdkutil/v2 github.com/tdakkota/vksdkutil/v3