/
auto_mock.go
64 lines (46 loc) · 1.68 KB
/
auto_mock.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// Code generated by "./generator ./session/com.deepin.api.pinyin"; DO NOT EDIT.
// SPDX-FileCopyrightText: 2018 - 2023 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later
package pinyin
import "fmt"
import "github.com/godbus/dbus/v5"
import "github.com/linuxdeepin/go-lib/dbusutil/proxy"
import "github.com/stretchr/testify/mock"
type MockPinyin struct {
MockInterfacePinyin // interface com.deepin.api.Pinyin
proxy.MockObject
}
type MockInterfacePinyin struct {
mock.Mock
}
// method Query
func (v *MockInterfacePinyin) GoQuery(flags dbus.Flags, ch chan *dbus.Call, hans string) *dbus.Call {
mockArgs := v.Called(flags, ch, hans)
ret, ok := mockArgs.Get(0).(*dbus.Call)
if !ok {
panic(fmt.Sprintf("assert: arguments: 0 failed because object wasn't correct type: %v", mockArgs.Get(0)))
}
return ret
}
func (v *MockInterfacePinyin) Query(flags dbus.Flags, hans string) ([]string, error) {
mockArgs := v.Called(flags, hans)
ret0, ok := mockArgs.Get(0).([]string)
if !ok {
panic(fmt.Sprintf("assert: arguments: %d failed because object wasn't correct type: %v", 0, mockArgs.Get(0)))
}
return ret0, mockArgs.Error(1)
}
// method QueryList
func (v *MockInterfacePinyin) GoQueryList(flags dbus.Flags, ch chan *dbus.Call, hansList []string) *dbus.Call {
mockArgs := v.Called(flags, ch, hansList)
ret, ok := mockArgs.Get(0).(*dbus.Call)
if !ok {
panic(fmt.Sprintf("assert: arguments: 0 failed because object wasn't correct type: %v", mockArgs.Get(0)))
}
return ret
}
func (v *MockInterfacePinyin) QueryList(flags dbus.Flags, hansList []string) (string, error) {
mockArgs := v.Called(flags, hansList)
return mockArgs.String(0), mockArgs.Error(1)
}