| // Code generated by mockery v0.0.0-dev. DO NOT EDIT. |
| |
| package mocks |
| |
| import ( |
| context "context" |
| |
| mock "github.com/stretchr/testify/mock" |
| modes "go.skia.org/infra/autoroll/go/modes" |
| |
| testing "testing" |
| ) |
| |
| // ModeHistory is an autogenerated mock type for the ModeHistory type |
| type ModeHistory struct { |
| mock.Mock |
| } |
| |
| // Add provides a mock function with given fields: ctx, mode, user, message |
| func (_m *ModeHistory) Add(ctx context.Context, mode string, user string, message string) error { |
| ret := _m.Called(ctx, mode, user, message) |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func(context.Context, string, string, string) error); ok { |
| r0 = rf(ctx, mode, user, message) |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // CurrentMode provides a mock function with given fields: |
| func (_m *ModeHistory) CurrentMode() *modes.ModeChange { |
| ret := _m.Called() |
| |
| var r0 *modes.ModeChange |
| if rf, ok := ret.Get(0).(func() *modes.ModeChange); ok { |
| r0 = rf() |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*modes.ModeChange) |
| } |
| } |
| |
| return r0 |
| } |
| |
| // GetHistory provides a mock function with given fields: |
| func (_m *ModeHistory) GetHistory() []*modes.ModeChange { |
| ret := _m.Called() |
| |
| var r0 []*modes.ModeChange |
| if rf, ok := ret.Get(0).(func() []*modes.ModeChange); ok { |
| r0 = rf() |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).([]*modes.ModeChange) |
| } |
| } |
| |
| return r0 |
| } |
| |
| // Update provides a mock function with given fields: ctx |
| func (_m *ModeHistory) Update(ctx context.Context) error { |
| ret := _m.Called(ctx) |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func(context.Context) error); ok { |
| r0 = rf(ctx) |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |
| |
| // NewModeHistory creates a new instance of ModeHistory. It also registers a cleanup function to assert the mocks expectations. |
| func NewModeHistory(t testing.TB) *ModeHistory { |
| mock := &ModeHistory{} |
| |
| t.Cleanup(func() { mock.AssertExpectations(t) }) |
| |
| return mock |
| } |