// Code generated by mockery v2.53.4. DO NOT EDIT. package pullrequest import ( context "context" url "net/url" mock "github.com/stretchr/testify/mock" v0alpha1 "github.com/grafana/grafana/apps/provisioning/pkg/apis/provisioning/v0alpha1" ) // MockScreenshotRenderer is an autogenerated mock type for the ScreenshotRenderer type type MockScreenshotRenderer struct { mock.Mock } type MockScreenshotRenderer_Expecter struct { mock *mock.Mock } func (_m *MockScreenshotRenderer) EXPECT() *MockScreenshotRenderer_Expecter { return &MockScreenshotRenderer_Expecter{mock: &_m.Mock} } // IsAvailable provides a mock function with given fields: ctx func (_m *MockScreenshotRenderer) IsAvailable(ctx context.Context) bool { ret := _m.Called(ctx) if len(ret) == 0 { panic("no return value specified for IsAvailable") } var r0 bool if rf, ok := ret.Get(0).(func(context.Context) bool); ok { r0 = rf(ctx) } else { r0 = ret.Get(0).(bool) } return r0 } // MockScreenshotRenderer_IsAvailable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsAvailable' type MockScreenshotRenderer_IsAvailable_Call struct { *mock.Call } // IsAvailable is a helper method to define mock.On call // - ctx context.Context func (_e *MockScreenshotRenderer_Expecter) IsAvailable(ctx interface{}) *MockScreenshotRenderer_IsAvailable_Call { return &MockScreenshotRenderer_IsAvailable_Call{Call: _e.mock.On("IsAvailable", ctx)} } func (_c *MockScreenshotRenderer_IsAvailable_Call) Run(run func(ctx context.Context)) *MockScreenshotRenderer_IsAvailable_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context)) }) return _c } func (_c *MockScreenshotRenderer_IsAvailable_Call) Return(_a0 bool) *MockScreenshotRenderer_IsAvailable_Call { _c.Call.Return(_a0) return _c } func (_c *MockScreenshotRenderer_IsAvailable_Call) RunAndReturn(run func(context.Context) bool) *MockScreenshotRenderer_IsAvailable_Call { _c.Call.Return(run) return _c } // RenderScreenshot provides a mock function with given fields: ctx, repo, path, values func (_m *MockScreenshotRenderer) RenderScreenshot(ctx context.Context, repo v0alpha1.ResourceRepositoryInfo, path string, values url.Values) (string, error) { ret := _m.Called(ctx, repo, path, values) if len(ret) == 0 { panic("no return value specified for RenderScreenshot") } var r0 string var r1 error if rf, ok := ret.Get(0).(func(context.Context, v0alpha1.ResourceRepositoryInfo, string, url.Values) (string, error)); ok { return rf(ctx, repo, path, values) } if rf, ok := ret.Get(0).(func(context.Context, v0alpha1.ResourceRepositoryInfo, string, url.Values) string); ok { r0 = rf(ctx, repo, path, values) } else { r0 = ret.Get(0).(string) } if rf, ok := ret.Get(1).(func(context.Context, v0alpha1.ResourceRepositoryInfo, string, url.Values) error); ok { r1 = rf(ctx, repo, path, values) } else { r1 = ret.Error(1) } return r0, r1 } // MockScreenshotRenderer_RenderScreenshot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RenderScreenshot' type MockScreenshotRenderer_RenderScreenshot_Call struct { *mock.Call } // RenderScreenshot is a helper method to define mock.On call // - ctx context.Context // - repo v0alpha1.ResourceRepositoryInfo // - path string // - values url.Values func (_e *MockScreenshotRenderer_Expecter) RenderScreenshot(ctx interface{}, repo interface{}, path interface{}, values interface{}) *MockScreenshotRenderer_RenderScreenshot_Call { return &MockScreenshotRenderer_RenderScreenshot_Call{Call: _e.mock.On("RenderScreenshot", ctx, repo, path, values)} } func (_c *MockScreenshotRenderer_RenderScreenshot_Call) Run(run func(ctx context.Context, repo v0alpha1.ResourceRepositoryInfo, path string, values url.Values)) *MockScreenshotRenderer_RenderScreenshot_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(v0alpha1.ResourceRepositoryInfo), args[2].(string), args[3].(url.Values)) }) return _c } func (_c *MockScreenshotRenderer_RenderScreenshot_Call) Return(_a0 string, _a1 error) *MockScreenshotRenderer_RenderScreenshot_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *MockScreenshotRenderer_RenderScreenshot_Call) RunAndReturn(run func(context.Context, v0alpha1.ResourceRepositoryInfo, string, url.Values) (string, error)) *MockScreenshotRenderer_RenderScreenshot_Call { _c.Call.Return(run) return _c } // NewMockScreenshotRenderer creates a new instance of MockScreenshotRenderer. 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 NewMockScreenshotRenderer(t interface { mock.TestingT Cleanup(func()) }) *MockScreenshotRenderer { mock := &MockScreenshotRenderer{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock }