2022-11-14 13:08:10 -06:00
// Code generated by mockery v2.14.0. DO NOT EDIT.
2022-07-13 17:36:17 -05:00
package provisioning
import (
context "context"
mock "github.com/stretchr/testify/mock"
2023-01-30 02:55:35 -06:00
quota "github.com/grafana/grafana/pkg/services/quota"
2022-07-13 17:36:17 -05:00
)
// MockQuotaChecker is an autogenerated mock type for the QuotaChecker type
type MockQuotaChecker struct {
mock . Mock
}
type MockQuotaChecker_Expecter struct {
mock * mock . Mock
}
func ( _m * MockQuotaChecker ) EXPECT ( ) * MockQuotaChecker_Expecter {
return & MockQuotaChecker_Expecter { mock : & _m . Mock }
}
// CheckQuotaReached provides a mock function with given fields: ctx, target, scopeParams
2022-11-14 13:08:10 -06:00
func ( _m * MockQuotaChecker ) CheckQuotaReached ( ctx context . Context , target quota . TargetSrv , scopeParams * quota . ScopeParameters ) ( bool , error ) {
2022-07-13 17:36:17 -05:00
ret := _m . Called ( ctx , target , scopeParams )
var r0 bool
2022-11-14 13:08:10 -06:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , quota . TargetSrv , * quota . ScopeParameters ) bool ) ; ok {
2022-07-13 17:36:17 -05:00
r0 = rf ( ctx , target , scopeParams )
} else {
r0 = ret . Get ( 0 ) . ( bool )
}
var r1 error
2022-11-14 13:08:10 -06:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , quota . TargetSrv , * quota . ScopeParameters ) error ) ; ok {
2022-07-13 17:36:17 -05:00
r1 = rf ( ctx , target , scopeParams )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// MockQuotaChecker_CheckQuotaReached_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckQuotaReached'
type MockQuotaChecker_CheckQuotaReached_Call struct {
* mock . Call
}
// CheckQuotaReached is a helper method to define mock.On call
2022-11-15 05:54:24 -06:00
// - ctx context.Context
// - target quota.TargetSrv
// - scopeParams *quota.ScopeParameters
2022-07-13 17:36:17 -05:00
func ( _e * MockQuotaChecker_Expecter ) CheckQuotaReached ( ctx interface { } , target interface { } , scopeParams interface { } ) * MockQuotaChecker_CheckQuotaReached_Call {
return & MockQuotaChecker_CheckQuotaReached_Call { Call : _e . mock . On ( "CheckQuotaReached" , ctx , target , scopeParams ) }
}
2022-11-14 13:08:10 -06:00
func ( _c * MockQuotaChecker_CheckQuotaReached_Call ) Run ( run func ( ctx context . Context , target quota . TargetSrv , scopeParams * quota . ScopeParameters ) ) * MockQuotaChecker_CheckQuotaReached_Call {
2022-07-13 17:36:17 -05:00
_c . Call . Run ( func ( args mock . Arguments ) {
2022-11-14 13:08:10 -06:00
run ( args [ 0 ] . ( context . Context ) , args [ 1 ] . ( quota . TargetSrv ) , args [ 2 ] . ( * quota . ScopeParameters ) )
2022-07-13 17:36:17 -05:00
} )
return _c
}
func ( _c * MockQuotaChecker_CheckQuotaReached_Call ) Return ( _a0 bool , _a1 error ) * MockQuotaChecker_CheckQuotaReached_Call {
_c . Call . Return ( _a0 , _a1 )
return _c
}
2022-11-14 13:08:10 -06:00
type mockConstructorTestingTNewMockQuotaChecker interface {
mock . TestingT
Cleanup ( func ( ) )
}
// NewMockQuotaChecker creates a new instance of MockQuotaChecker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockQuotaChecker ( t mockConstructorTestingTNewMockQuotaChecker ) * MockQuotaChecker {
2022-07-13 17:36:17 -05:00
mock := & MockQuotaChecker { }
mock . Mock . Test ( t )
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}