2023-10-19 04:27:37 -05:00
// Code generated by mockery v2.34.2. DO NOT EDIT.
2022-07-12 14:13:04 -05:00
package schedule
import (
2023-10-19 04:27:37 -05:00
context "context"
2022-07-12 14:13:04 -05:00
2023-01-30 02:55:35 -06:00
definitions "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
2023-10-19 04:27:37 -05:00
mock "github.com/stretchr/testify/mock"
2022-07-12 14:13:04 -05:00
models "github.com/grafana/grafana/pkg/services/ngalert/models"
)
// AlertsSenderMock is an autogenerated mock type for the AlertsSender type
type AlertsSenderMock struct {
mock . Mock
}
type AlertsSenderMock_Expecter struct {
mock * mock . Mock
}
func ( _m * AlertsSenderMock ) EXPECT ( ) * AlertsSenderMock_Expecter {
return & AlertsSenderMock_Expecter { mock : & _m . Mock }
}
2023-10-19 04:27:37 -05:00
// Send provides a mock function with given fields: ctx, key, alerts
func ( _m * AlertsSenderMock ) Send ( ctx context . Context , key models . AlertRuleKey , alerts definitions . PostableAlerts ) {
_m . Called ( ctx , key , alerts )
2022-07-12 14:13:04 -05:00
}
// AlertsSenderMock_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send'
type AlertsSenderMock_Send_Call struct {
* mock . Call
}
// Send is a helper method to define mock.On call
2023-10-19 04:27:37 -05:00
// - ctx context.Context
2022-09-12 05:03:49 -05:00
// - key models.AlertRuleKey
// - alerts definitions.PostableAlerts
2023-10-19 04:27:37 -05:00
func ( _e * AlertsSenderMock_Expecter ) Send ( ctx interface { } , key interface { } , alerts interface { } ) * AlertsSenderMock_Send_Call {
return & AlertsSenderMock_Send_Call { Call : _e . mock . On ( "Send" , ctx , key , alerts ) }
2022-07-12 14:13:04 -05:00
}
2023-10-19 04:27:37 -05:00
func ( _c * AlertsSenderMock_Send_Call ) Run ( run func ( ctx context . Context , key models . AlertRuleKey , alerts definitions . PostableAlerts ) ) * AlertsSenderMock_Send_Call {
2022-07-12 14:13:04 -05:00
_c . Call . Run ( func ( args mock . Arguments ) {
2023-10-19 04:27:37 -05:00
run ( args [ 0 ] . ( context . Context ) , args [ 1 ] . ( models . AlertRuleKey ) , args [ 2 ] . ( definitions . PostableAlerts ) )
2022-07-12 14:13:04 -05:00
} )
return _c
}
func ( _c * AlertsSenderMock_Send_Call ) Return ( ) * AlertsSenderMock_Send_Call {
_c . Call . Return ( )
return _c
}
2023-10-19 04:27:37 -05:00
func ( _c * AlertsSenderMock_Send_Call ) RunAndReturn ( run func ( context . Context , models . AlertRuleKey , definitions . PostableAlerts ) ) * AlertsSenderMock_Send_Call {
_c . Call . Return ( run )
return _c
}
// NewAlertsSenderMock creates a new instance of AlertsSenderMock. 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 NewAlertsSenderMock ( t interface {
mock . TestingT
Cleanup ( func ( ) )
} ) * AlertsSenderMock {
mock := & AlertsSenderMock { }
mock . Mock . Test ( t )
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}