| // Code generated by mockery v0.0.0-dev. DO NOT EDIT. |
| |
| package mocks |
| |
| import ( |
| context "context" |
| |
| mock "github.com/stretchr/testify/mock" |
| |
| protov1 "go.skia.org/infra/perf/go/subscription/proto/v1" |
| |
| v1 "go.skia.org/infra/perf/go/culprit/proto/v1" |
| ) |
| |
| // CulpritNotifier is an autogenerated mock type for the CulpritNotifier type |
| type CulpritNotifier struct { |
| mock.Mock |
| } |
| |
| // NotifyAnomaliesFound provides a mock function with given fields: ctx, anomalies, subscription |
| func (_m *CulpritNotifier) NotifyAnomaliesFound(ctx context.Context, anomalies []*v1.Anomaly, subscription *protov1.Subscription) (string, error) { |
| ret := _m.Called(ctx, anomalies, subscription) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for NotifyAnomaliesFound") |
| } |
| |
| var r0 string |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, []*v1.Anomaly, *protov1.Subscription) (string, error)); ok { |
| return rf(ctx, anomalies, subscription) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, []*v1.Anomaly, *protov1.Subscription) string); ok { |
| r0 = rf(ctx, anomalies, subscription) |
| } else { |
| r0 = ret.Get(0).(string) |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, []*v1.Anomaly, *protov1.Subscription) error); ok { |
| r1 = rf(ctx, anomalies, subscription) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // NotifyCulpritFound provides a mock function with given fields: ctx, culprit, subscription |
| func (_m *CulpritNotifier) NotifyCulpritFound(ctx context.Context, culprit *v1.Culprit, subscription *protov1.Subscription) (string, error) { |
| ret := _m.Called(ctx, culprit, subscription) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for NotifyCulpritFound") |
| } |
| |
| var r0 string |
| var r1 error |
| if rf, ok := ret.Get(0).(func(context.Context, *v1.Culprit, *protov1.Subscription) (string, error)); ok { |
| return rf(ctx, culprit, subscription) |
| } |
| if rf, ok := ret.Get(0).(func(context.Context, *v1.Culprit, *protov1.Subscription) string); ok { |
| r0 = rf(ctx, culprit, subscription) |
| } else { |
| r0 = ret.Get(0).(string) |
| } |
| |
| if rf, ok := ret.Get(1).(func(context.Context, *v1.Culprit, *protov1.Subscription) error); ok { |
| r1 = rf(ctx, culprit, subscription) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // NewCulpritNotifier creates a new instance of CulpritNotifier. 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 NewCulpritNotifier(t interface { |
| mock.TestingT |
| Cleanup(func()) |
| }) *CulpritNotifier { |
| mock := &CulpritNotifier{} |
| mock.Mock.Test(t) |
| |
| t.Cleanup(func() { mock.AssertExpectations(t) }) |
| |
| return mock |
| } |