github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/fvm/environment/mock/random_generator.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mock 4 5 import mock "github.com/stretchr/testify/mock" 6 7 // RandomGenerator is an autogenerated mock type for the RandomGenerator type 8 type RandomGenerator struct { 9 mock.Mock 10 } 11 12 // ReadRandom provides a mock function with given fields: _a0 13 func (_m *RandomGenerator) ReadRandom(_a0 []byte) error { 14 ret := _m.Called(_a0) 15 16 var r0 error 17 if rf, ok := ret.Get(0).(func([]byte) error); ok { 18 r0 = rf(_a0) 19 } else { 20 r0 = ret.Error(0) 21 } 22 23 return r0 24 } 25 26 type mockConstructorTestingTNewRandomGenerator interface { 27 mock.TestingT 28 Cleanup(func()) 29 } 30 31 // NewRandomGenerator creates a new instance of RandomGenerator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 32 func NewRandomGenerator(t mockConstructorTestingTNewRandomGenerator) *RandomGenerator { 33 mock := &RandomGenerator{} 34 mock.Mock.Test(t) 35 36 t.Cleanup(func() { mock.AssertExpectations(t) }) 37 38 return mock 39 }