forked from Mirrors/go-iap
add mocks for appstore
This commit is contained in:
49
appstore/mocks/mock_appstore.go
Normal file
49
appstore/mocks/mock_appstore.go
Normal 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)
|
||||||
|
}
|
||||||
@@ -10,6 +10,8 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//go:generate mockgen -destination=mocks/mock_appstore.go -package=mocks github.com/awa/go-iap/appstore IAPClient
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// SandboxURL is the endpoint for sandbox environment.
|
// SandboxURL is the endpoint for sandbox environment.
|
||||||
SandboxURL string = "https://sandbox.itunes.apple.com/verifyReceipt"
|
SandboxURL string = "https://sandbox.itunes.apple.com/verifyReceipt"
|
||||||
|
|||||||
Reference in New Issue
Block a user