github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/onetimetoken/automock/token_generator.go (about) 1 // Code generated by mockery. DO NOT EDIT. 2 3 package automock 4 5 import mock "github.com/stretchr/testify/mock" 6 7 // TokenGenerator is an autogenerated mock type for the TokenGenerator type 8 type TokenGenerator struct { 9 mock.Mock 10 } 11 12 // NewToken provides a mock function with given fields: 13 func (_m *TokenGenerator) NewToken() (string, error) { 14 ret := _m.Called() 15 16 var r0 string 17 if rf, ok := ret.Get(0).(func() string); ok { 18 r0 = rf() 19 } else { 20 r0 = ret.Get(0).(string) 21 } 22 23 var r1 error 24 if rf, ok := ret.Get(1).(func() error); ok { 25 r1 = rf() 26 } else { 27 r1 = ret.Error(1) 28 } 29 30 return r0, r1 31 } 32 33 type mockConstructorTestingTNewTokenGenerator interface { 34 mock.TestingT 35 Cleanup(func()) 36 } 37 38 // NewTokenGenerator creates a new instance of TokenGenerator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 39 func NewTokenGenerator(t mockConstructorTestingTNewTokenGenerator) *TokenGenerator { 40 mock := &TokenGenerator{} 41 mock.Mock.Test(t) 42 43 t.Cleanup(func() { mock.AssertExpectations(t) }) 44 45 return mock 46 }