// Code generated by "./generator ./system/com.lingmo.api.localehelper"; DO NOT EDIT.

// SPDX-FileCopyrightText: 2018 - 2023 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later
package localehelper

import (
	"fmt"

	"github.com/godbus/dbus/v5"
	"github.com/LingmoOS/golang-github-lingmo-go-lib/dbusutil"
	"github.com/LingmoOS/golang-github-lingmo-go-lib/dbusutil/proxy"
	"github.com/stretchr/testify/mock"
)

type MockLocaleHelper struct {
	MockInterfaceLocaleHelper // interface com.lingmo.api.LocaleHelper
	proxy.MockObject
}

type MockInterfaceLocaleHelper struct {
	mock.Mock
}

// method GenerateLocale

func (v *MockInterfaceLocaleHelper) GoGenerateLocale(flags dbus.Flags, ch chan *dbus.Call, locale string) *dbus.Call {
	mockArgs := v.Called(flags, ch, locale)

	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 *MockInterfaceLocaleHelper) GenerateLocale(flags dbus.Flags, locale string) error {
	mockArgs := v.Called(flags, locale)

	return mockArgs.Error(0)
}

// method SetLocale

func (v *MockInterfaceLocaleHelper) GoSetLocale(flags dbus.Flags, ch chan *dbus.Call, locale string) *dbus.Call {
	mockArgs := v.Called(flags, ch, locale)

	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 *MockInterfaceLocaleHelper) SetLocale(flags dbus.Flags, locale string) error {
	mockArgs := v.Called(flags, locale)

	return mockArgs.Error(0)
}

// signal Success

func (v *MockInterfaceLocaleHelper) ConnectSuccess(cb func(ok bool, reason string)) (dbusutil.SignalHandlerId, error) {
	mockArgs := v.Called(cb)

	ret0, ok := mockArgs.Get(0).(dbusutil.SignalHandlerId)
	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)
}
