2022-06-03 15:11:32 -05:00
// Code generated by mockery v2.12.3. DO NOT EDIT.
2022-04-27 03:29:39 -05:00
package store
import (
context "context"
time "time"
mock "github.com/stretchr/testify/mock"
)
// MockEntityEventsService is an autogenerated mock type for the EntityEventsService type
type MockEntityEventsService struct {
mock . Mock
}
// GetAllEventsAfter provides a mock function with given fields: ctx, id
func ( _m * MockEntityEventsService ) GetAllEventsAfter ( ctx context . Context , id int64 ) ( [ ] * EntityEvent , error ) {
ret := _m . Called ( ctx , id )
var r0 [ ] * EntityEvent
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , int64 ) [ ] * EntityEvent ) ; ok {
r0 = rf ( ctx , id )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( [ ] * EntityEvent )
}
}
var r1 error
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , int64 ) error ) ; ok {
r1 = rf ( ctx , id )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// GetLastEvent provides a mock function with given fields: ctx
func ( _m * MockEntityEventsService ) GetLastEvent ( ctx context . Context ) ( * EntityEvent , error ) {
ret := _m . Called ( ctx )
var r0 * EntityEvent
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) * EntityEvent ) ; ok {
r0 = rf ( ctx )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * EntityEvent )
}
}
var r1 error
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context ) error ) ; ok {
r1 = rf ( ctx )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// IsDisabled provides a mock function with given fields:
func ( _m * MockEntityEventsService ) IsDisabled ( ) bool {
ret := _m . Called ( )
var r0 bool
if rf , ok := ret . Get ( 0 ) . ( func ( ) bool ) ; ok {
r0 = rf ( )
} else {
r0 = ret . Get ( 0 ) . ( bool )
}
return r0
}
2022-06-03 15:11:32 -05:00
// OnEvent provides a mock function with given fields: handler
func ( _m * MockEntityEventsService ) OnEvent ( handler EventHandler ) {
_m . Called ( handler )
}
2022-04-27 03:29:39 -05:00
// Run provides a mock function with given fields: ctx
func ( _m * MockEntityEventsService ) Run ( 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
}
// SaveEvent provides a mock function with given fields: ctx, cmd
func ( _m * MockEntityEventsService ) SaveEvent ( ctx context . Context , cmd SaveEventCmd ) error {
ret := _m . Called ( ctx , cmd )
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , SaveEventCmd ) error ) ; ok {
r0 = rf ( ctx , cmd )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
// deleteEventsOlderThan provides a mock function with given fields: ctx, duration
func ( _m * MockEntityEventsService ) deleteEventsOlderThan ( ctx context . Context , duration time . Duration ) error {
ret := _m . Called ( ctx , duration )
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , time . Duration ) error ) ; ok {
r0 = rf ( ctx , duration )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
2022-06-03 15:11:32 -05:00
type NewMockEntityEventsServiceT interface {
mock . TestingT
Cleanup ( func ( ) )
}
// NewMockEntityEventsService creates a new instance of MockEntityEventsService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockEntityEventsService ( t NewMockEntityEventsServiceT ) * MockEntityEventsService {
mock := & MockEntityEventsService { }
mock . Mock . Test ( t )
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}