2024-03-15 18:57:11 +00:00
// Code generated by mockery v2.37.1. DO NOT EDIT.
2023-01-18 18:33:21 +00:00
package catalog
import (
2023-08-29 15:15:34 +00:00
context "context"
2023-08-29 21:39:29 +00:00
limiter "github.com/hashicorp/consul/agent/grpc-external/limiter"
2023-01-18 18:33:21 +00:00
mock "github.com/stretchr/testify/mock"
)
// MockSessionLimiter is an autogenerated mock type for the SessionLimiter type
type MockSessionLimiter struct {
mock . Mock
}
// BeginSession provides a mock function with given fields:
func ( _m * MockSessionLimiter ) BeginSession ( ) ( limiter . Session , error ) {
ret := _m . Called ( )
var r0 limiter . Session
2023-08-29 15:15:34 +00:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( ) ( limiter . Session , error ) ) ; ok {
return rf ( )
}
2023-01-18 18:33:21 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( ) limiter . Session ) ; ok {
r0 = rf ( )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( limiter . Session )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( ) error ) ; ok {
r1 = rf ( )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2023-08-29 15:15:34 +00:00
// Run provides a mock function with given fields: ctx
func ( _m * MockSessionLimiter ) Run ( ctx context . Context ) {
_m . Called ( ctx )
2023-01-18 18:33:21 +00:00
}
// NewMockSessionLimiter creates a new instance of MockSessionLimiter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
2023-08-29 15:15:34 +00:00
// The first argument is typically a *testing.T value.
func NewMockSessionLimiter ( t interface {
mock . TestingT
Cleanup ( func ( ) )
} ) * MockSessionLimiter {
2023-01-18 18:33:21 +00:00
mock := & MockSessionLimiter { }
mock . Mock . Test ( t )
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}