...
1 package xinput
2
3 import (
4 "github.com/stretchr/testify/mock"
5
6 "edge-infra.dev/pkg/sds/lib/xorg/xinput"
7 )
8
9 type fakeXinput struct {
10 Mock mock.Mock
11 }
12
13 func NewFakeXinput() (xinput.Xinput, *mock.Mock) {
14 x := &fakeXinput{}
15 return x, &x.Mock
16 }
17
18 func (x *fakeXinput) GetInputDeviceInfos() (xinput.InputDeviceInfos, error) {
19 args := x.Mock.Called()
20 if args.Get(0) == nil {
21 return nil, args.Error(1)
22 }
23 return args.Get(0).(xinput.InputDeviceInfos), args.Error(1)
24 }
25
View as plain text