github.com/goravel/framework@v1.13.9/contracts/cache/mocks/Lock.go (about)

     1  // Code generated by mockery v2.14.0. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	time "time"
     7  
     8  	mock "github.com/stretchr/testify/mock"
     9  )
    10  
    11  // Lock is an autogenerated mock type for the Lock type
    12  type Lock struct {
    13  	mock.Mock
    14  }
    15  
    16  // Block provides a mock function with given fields: t, callback
    17  func (_m *Lock) Block(t time.Duration, callback ...func()) bool {
    18  	_va := make([]interface{}, len(callback))
    19  	for _i := range callback {
    20  		_va[_i] = callback[_i]
    21  	}
    22  	var _ca []interface{}
    23  	_ca = append(_ca, t)
    24  	_ca = append(_ca, _va...)
    25  	ret := _m.Called(_ca...)
    26  
    27  	var r0 bool
    28  	if rf, ok := ret.Get(0).(func(time.Duration, ...func()) bool); ok {
    29  		r0 = rf(t, callback...)
    30  	} else {
    31  		r0 = ret.Get(0).(bool)
    32  	}
    33  
    34  	return r0
    35  }
    36  
    37  // ForceRelease provides a mock function with given fields:
    38  func (_m *Lock) ForceRelease() bool {
    39  	ret := _m.Called()
    40  
    41  	var r0 bool
    42  	if rf, ok := ret.Get(0).(func() bool); ok {
    43  		r0 = rf()
    44  	} else {
    45  		r0 = ret.Get(0).(bool)
    46  	}
    47  
    48  	return r0
    49  }
    50  
    51  // Get provides a mock function with given fields: callback
    52  func (_m *Lock) Get(callback ...func()) bool {
    53  	_va := make([]interface{}, len(callback))
    54  	for _i := range callback {
    55  		_va[_i] = callback[_i]
    56  	}
    57  	var _ca []interface{}
    58  	_ca = append(_ca, _va...)
    59  	ret := _m.Called(_ca...)
    60  
    61  	var r0 bool
    62  	if rf, ok := ret.Get(0).(func(...func()) bool); ok {
    63  		r0 = rf(callback...)
    64  	} else {
    65  		r0 = ret.Get(0).(bool)
    66  	}
    67  
    68  	return r0
    69  }
    70  
    71  // Release provides a mock function with given fields:
    72  func (_m *Lock) Release() bool {
    73  	ret := _m.Called()
    74  
    75  	var r0 bool
    76  	if rf, ok := ret.Get(0).(func() bool); ok {
    77  		r0 = rf()
    78  	} else {
    79  		r0 = ret.Get(0).(bool)
    80  	}
    81  
    82  	return r0
    83  }
    84  
    85  type mockConstructorTestingTNewLock interface {
    86  	mock.TestingT
    87  	Cleanup(func())
    88  }
    89  
    90  // NewLock creates a new instance of Lock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    91  func NewLock(t mockConstructorTestingTNewLock) *Lock {
    92  	mock := &Lock{}
    93  	mock.Mock.Test(t)
    94  
    95  	t.Cleanup(func() { mock.AssertExpectations(t) })
    96  
    97  	return mock
    98  }