github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/p2p/mock/update_function.go (about)

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mockp2p
     4  
     5  import (
     6  	p2p "github.com/onflow/flow-go/network/p2p"
     7  	mock "github.com/stretchr/testify/mock"
     8  )
     9  
    10  // UpdateFunction is an autogenerated mock type for the UpdateFunction type
    11  type UpdateFunction struct {
    12  	mock.Mock
    13  }
    14  
    15  // Execute provides a mock function with given fields: record
    16  func (_m *UpdateFunction) Execute(record p2p.GossipSubSpamRecord) p2p.GossipSubSpamRecord {
    17  	ret := _m.Called(record)
    18  
    19  	var r0 p2p.GossipSubSpamRecord
    20  	if rf, ok := ret.Get(0).(func(p2p.GossipSubSpamRecord) p2p.GossipSubSpamRecord); ok {
    21  		r0 = rf(record)
    22  	} else {
    23  		r0 = ret.Get(0).(p2p.GossipSubSpamRecord)
    24  	}
    25  
    26  	return r0
    27  }
    28  
    29  type mockConstructorTestingTNewUpdateFunction interface {
    30  	mock.TestingT
    31  	Cleanup(func())
    32  }
    33  
    34  // NewUpdateFunction creates a new instance of UpdateFunction. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    35  func NewUpdateFunction(t mockConstructorTestingTNewUpdateFunction) *UpdateFunction {
    36  	mock := &UpdateFunction{}
    37  	mock.Mock.Test(t)
    38  
    39  	t.Cleanup(func() { mock.AssertExpectations(t) })
    40  
    41  	return mock
    42  }