File size: 2,558 Bytes
95d599c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
//                           _       _
// __      _____  __ ___   ___  __ _| |_ ___
// \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \
//  \ V  V /  __/ (_| |\ V /| | (_| | ||  __/
//   \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___|
//
//  Copyright © 2016 - 2025 Weaviate B.V. All rights reserved.
//
//  CONTACT: hello@weaviate.io
//

// Code generated by mockery v2.53.2. DO NOT EDIT.

package replication

import (
	time "time"

	mock "github.com/stretchr/testify/mock"
)

// MockTimer is an autogenerated mock type for the Timer type
type MockTimer struct {
	mock.Mock
}

type MockTimer_Expecter struct {
	mock *mock.Mock
}

func (_m *MockTimer) EXPECT() *MockTimer_Expecter {
	return &MockTimer_Expecter{mock: &_m.Mock}
}

// AfterFunc provides a mock function with given fields: duration, fn
func (_m *MockTimer) AfterFunc(duration time.Duration, fn func()) *time.Timer {
	ret := _m.Called(duration, fn)

	if len(ret) == 0 {
		panic("no return value specified for AfterFunc")
	}

	var r0 *time.Timer
	if rf, ok := ret.Get(0).(func(time.Duration, func()) *time.Timer); ok {
		r0 = rf(duration, fn)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*time.Timer)
		}
	}

	return r0
}

// MockTimer_AfterFunc_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AfterFunc'
type MockTimer_AfterFunc_Call struct {
	*mock.Call
}

// AfterFunc is a helper method to define mock.On call
//   - duration time.Duration
//   - fn func()
func (_e *MockTimer_Expecter) AfterFunc(duration interface{}, fn interface{}) *MockTimer_AfterFunc_Call {
	return &MockTimer_AfterFunc_Call{Call: _e.mock.On("AfterFunc", duration, fn)}
}

func (_c *MockTimer_AfterFunc_Call) Run(run func(duration time.Duration, fn func())) *MockTimer_AfterFunc_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(time.Duration), args[1].(func()))
	})
	return _c
}

func (_c *MockTimer_AfterFunc_Call) Return(_a0 *time.Timer) *MockTimer_AfterFunc_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockTimer_AfterFunc_Call) RunAndReturn(run func(time.Duration, func()) *time.Timer) *MockTimer_AfterFunc_Call {
	_c.Call.Return(run)
	return _c
}

// NewMockTimer creates a new instance of MockTimer. 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 NewMockTimer(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockTimer {
	mock := &MockTimer{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}