1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8 "context"
9
10 mock "github.com/stretchr/testify/mock"
11)
12
13// NewMockPermissionPopup creates a new instance of MockPermissionPopup. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
14// The first argument is typically a *testing.T value.
15func NewMockPermissionPopup(t interface {
16 mock.TestingT
17 Cleanup(func())
18}) *MockPermissionPopup {
19 if helper, ok := t.(interface{ Helper() }); ok {
20 helper.Helper()
21 }
22
23 mock := &MockPermissionPopup{}
24 mock.Mock.Test(t)
25
26 t.Cleanup(func() {
27 if helper, ok := t.(interface{ Helper() }); ok {
28 helper.Helper()
29 }
30 mock.AssertExpectations(t)
31 })
32
33 return mock
34}
35
36// MockPermissionPopup is an autogenerated mock type for the permissionPopup type
37type MockPermissionPopup struct {
38 mock.Mock
39}
40
41type MockPermissionPopup_Expecter struct {
42 mock *mock.Mock
43}
44
45func (_m *MockPermissionPopup) EXPECT() *MockPermissionPopup_Expecter {
46 return &MockPermissionPopup_Expecter{mock: &_m.Mock}
47}
48
49// Show provides a mock function for the type MockPermissionPopup
50func (_mock *MockPermissionPopup) Show(ctx context.Context, heading string, body string, persistable bool, callback func(allowed bool, persistent bool)) {
51 _mock.Called(ctx, heading, body, persistable, callback)
52 return
53}
54
55// MockPermissionPopup_Show_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Show'
56type MockPermissionPopup_Show_Call struct {
57 *mock.Call
58}
59
60// Show is a helper method to define mock.On call
61// - ctx context.Context
62// - heading string
63// - body string
64// - persistable bool
65// - callback func(allowed bool, persistent bool)
66func (_e *MockPermissionPopup_Expecter) Show(ctx any, heading any, body any, persistable any, callback any) *MockPermissionPopup_Show_Call {
67 return &MockPermissionPopup_Show_Call{Call: _e.mock.On("Show", ctx, heading, body, persistable, callback)}
68}
69
70func (_c *MockPermissionPopup_Show_Call) Run(run func(ctx context.Context, heading string, body string, persistable bool, callback func(allowed bool, persistent bool))) *MockPermissionPopup_Show_Call {
71 _c.Call.Run(func(args mock.Arguments) {
72 var arg0 context.Context
73 if args[0] != nil {
74 arg0 = args[0].(context.Context)
75 }
76 var arg1 string
77 if args[1] != nil {
78 arg1 = args[1].(string)
79 }
80 var arg2 string
81 if args[2] != nil {
82 arg2 = args[2].(string)
83 }
84 var arg3 bool
85 if args[3] != nil {
86 arg3 = args[3].(bool)
87 }
88 var arg4 func(allowed bool, persistent bool)
89 if args[4] != nil {
90 arg4 = args[4].(func(allowed bool, persistent bool))
91 }
92 run(
93 arg0,
94 arg1,
95 arg2,
96 arg3,
97 arg4,
98 )
99 })
100 return _c
101}
102
103func (_c *MockPermissionPopup_Show_Call) Return() *MockPermissionPopup_Show_Call {
104 _c.Call.Return()
105 return _c
106}
107
108func (_c *MockPermissionPopup_Show_Call) RunAndReturn(run func(ctx context.Context, heading string, body string, persistable bool, callback func(allowed bool, persistent bool))) *MockPermissionPopup_Show_Call {
109 _c.Run(run)
110 return _c
111}