File: mock_schedule_test.go

package info (click to toggle)
gitlab-agent 16.11.5-1
  • links: PTS, VCS
  • area: contrib
  • in suites: experimental
  • size: 7,072 kB
  • sloc: makefile: 193; sh: 55; ruby: 3
file content (78 lines) | stat: -rw-r--r-- 2,112 bytes parent folder | download
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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/robfig/cron/v3 (interfaces: Schedule)
//
// Generated by this command:
//
//	mockgen -typed -destination mock_schedule_test.go -package agent github.com/robfig/cron/v3 Schedule
//

// Package agent is a generated GoMock package.
package agent

import (
	reflect "reflect"
	time "time"

	gomock "go.uber.org/mock/gomock"
)

// MockSchedule is a mock of Schedule interface.
type MockSchedule struct {
	ctrl     *gomock.Controller
	recorder *MockScheduleMockRecorder
}

// MockScheduleMockRecorder is the mock recorder for MockSchedule.
type MockScheduleMockRecorder struct {
	mock *MockSchedule
}

// NewMockSchedule creates a new mock instance.
func NewMockSchedule(ctrl *gomock.Controller) *MockSchedule {
	mock := &MockSchedule{ctrl: ctrl}
	mock.recorder = &MockScheduleMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockSchedule) EXPECT() *MockScheduleMockRecorder {
	return m.recorder
}

// Next mocks base method.
func (m *MockSchedule) Next(arg0 time.Time) time.Time {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Next", arg0)
	ret0, _ := ret[0].(time.Time)
	return ret0
}

// Next indicates an expected call of Next.
func (mr *MockScheduleMockRecorder) Next(arg0 any) *MockScheduleNextCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Next", reflect.TypeOf((*MockSchedule)(nil).Next), arg0)
	return &MockScheduleNextCall{Call: call}
}

// MockScheduleNextCall wrap *gomock.Call
type MockScheduleNextCall struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockScheduleNextCall) Return(arg0 time.Time) *MockScheduleNextCall {
	c.Call = c.Call.Return(arg0)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockScheduleNextCall) Do(f func(time.Time) time.Time) *MockScheduleNextCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockScheduleNextCall) DoAndReturn(f func(time.Time) time.Time) *MockScheduleNextCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}