add mocks for appstore

This commit is contained in:
Sabrina
2020-01-30 16:04:26 -08:00
parent 98cf7b036f
commit e54455a635
2 changed files with 51 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/awa/go-iap/appstore (interfaces: IAPClient)
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
appstore "github.com/awa/go-iap/appstore"
gomock "github.com/golang/mock/gomock"
reflect "reflect"
)
// MockIAPClient is a mock of IAPClient interface
type MockIAPClient struct {
ctrl *gomock.Controller
recorder *MockIAPClientMockRecorder
}
// MockIAPClientMockRecorder is the mock recorder for MockIAPClient
type MockIAPClientMockRecorder struct {
mock *MockIAPClient
}
// NewMockIAPClient creates a new mock instance
func NewMockIAPClient(ctrl *gomock.Controller) *MockIAPClient {
mock := &MockIAPClient{ctrl: ctrl}
mock.recorder = &MockIAPClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockIAPClient) EXPECT() *MockIAPClientMockRecorder {
return m.recorder
}
// Verify mocks base method
func (m *MockIAPClient) Verify(arg0 context.Context, arg1 appstore.IAPRequest, arg2 interface{}) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Verify", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// Verify indicates an expected call of Verify
func (mr *MockIAPClientMockRecorder) Verify(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verify", reflect.TypeOf((*MockIAPClient)(nil).Verify), arg0, arg1, arg2)
}

View File

@@ -10,6 +10,8 @@ import (
"time"
)
//go:generate mockgen -destination=mocks/mock_appstore.go -package=mocks github.com/awa/go-iap/appstore IAPClient
const (
// SandboxURL is the endpoint for sandbox environment.
SandboxURL string = "https://sandbox.itunes.apple.com/verifyReceipt"