hash-of-wisdom/internal/application/mocks/mock_wisdom_service.go

204 lines
6.2 KiB
Go

// Code generated by mockery v2.53.5. DO NOT EDIT.
package mocks
import (
context "context"
challenge "hash-of-wisdom/internal/pow/challenge"
mock "github.com/stretchr/testify/mock"
quotes "hash-of-wisdom/internal/quotes"
)
// MockWisdomService is an autogenerated mock type for the WisdomService type
type MockWisdomService struct {
mock.Mock
}
type MockWisdomService_Expecter struct {
mock *mock.Mock
}
func (_m *MockWisdomService) EXPECT() *MockWisdomService_Expecter {
return &MockWisdomService_Expecter{mock: &_m.Mock}
}
// GenerateChallenge provides a mock function with given fields: ctx, resource
func (_m *MockWisdomService) GenerateChallenge(ctx context.Context, resource string) (*challenge.Challenge, error) {
ret := _m.Called(ctx, resource)
if len(ret) == 0 {
panic("no return value specified for GenerateChallenge")
}
var r0 *challenge.Challenge
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*challenge.Challenge, error)); ok {
return rf(ctx, resource)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *challenge.Challenge); ok {
r0 = rf(ctx, resource)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*challenge.Challenge)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, resource)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockWisdomService_GenerateChallenge_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenerateChallenge'
type MockWisdomService_GenerateChallenge_Call struct {
*mock.Call
}
// GenerateChallenge is a helper method to define mock.On call
// - ctx context.Context
// - resource string
func (_e *MockWisdomService_Expecter) GenerateChallenge(ctx interface{}, resource interface{}) *MockWisdomService_GenerateChallenge_Call {
return &MockWisdomService_GenerateChallenge_Call{Call: _e.mock.On("GenerateChallenge", ctx, resource)}
}
func (_c *MockWisdomService_GenerateChallenge_Call) Run(run func(ctx context.Context, resource string)) *MockWisdomService_GenerateChallenge_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string))
})
return _c
}
func (_c *MockWisdomService_GenerateChallenge_Call) Return(_a0 *challenge.Challenge, _a1 error) *MockWisdomService_GenerateChallenge_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockWisdomService_GenerateChallenge_Call) RunAndReturn(run func(context.Context, string) (*challenge.Challenge, error)) *MockWisdomService_GenerateChallenge_Call {
_c.Call.Return(run)
return _c
}
// GetQuote provides a mock function with given fields: ctx
func (_m *MockWisdomService) GetQuote(ctx context.Context) (*quotes.Quote, error) {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for GetQuote")
}
var r0 *quotes.Quote
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) (*quotes.Quote, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) *quotes.Quote); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*quotes.Quote)
}
}
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockWisdomService_GetQuote_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetQuote'
type MockWisdomService_GetQuote_Call struct {
*mock.Call
}
// GetQuote is a helper method to define mock.On call
// - ctx context.Context
func (_e *MockWisdomService_Expecter) GetQuote(ctx interface{}) *MockWisdomService_GetQuote_Call {
return &MockWisdomService_GetQuote_Call{Call: _e.mock.On("GetQuote", ctx)}
}
func (_c *MockWisdomService_GetQuote_Call) Run(run func(ctx context.Context)) *MockWisdomService_GetQuote_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context))
})
return _c
}
func (_c *MockWisdomService_GetQuote_Call) Return(_a0 *quotes.Quote, _a1 error) *MockWisdomService_GetQuote_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockWisdomService_GetQuote_Call) RunAndReturn(run func(context.Context) (*quotes.Quote, error)) *MockWisdomService_GetQuote_Call {
_c.Call.Return(run)
return _c
}
// VerifySolution provides a mock function with given fields: ctx, solution
func (_m *MockWisdomService) VerifySolution(ctx context.Context, solution *challenge.Solution) error {
ret := _m.Called(ctx, solution)
if len(ret) == 0 {
panic("no return value specified for VerifySolution")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *challenge.Solution) error); ok {
r0 = rf(ctx, solution)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockWisdomService_VerifySolution_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VerifySolution'
type MockWisdomService_VerifySolution_Call struct {
*mock.Call
}
// VerifySolution is a helper method to define mock.On call
// - ctx context.Context
// - solution *challenge.Solution
func (_e *MockWisdomService_Expecter) VerifySolution(ctx interface{}, solution interface{}) *MockWisdomService_VerifySolution_Call {
return &MockWisdomService_VerifySolution_Call{Call: _e.mock.On("VerifySolution", ctx, solution)}
}
func (_c *MockWisdomService_VerifySolution_Call) Run(run func(ctx context.Context, solution *challenge.Solution)) *MockWisdomService_VerifySolution_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*challenge.Solution))
})
return _c
}
func (_c *MockWisdomService_VerifySolution_Call) Return(_a0 error) *MockWisdomService_VerifySolution_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockWisdomService_VerifySolution_Call) RunAndReturn(run func(context.Context, *challenge.Solution) error) *MockWisdomService_VerifySolution_Call {
_c.Call.Return(run)
return _c
}
// NewMockWisdomService creates a new instance of MockWisdomService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockWisdomService(t interface {
mock.TestingT
Cleanup(func())
}) *MockWisdomService {
mock := &MockWisdomService{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}