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

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mockp2p
     4  
     5  import (
     6  	mock "github.com/stretchr/testify/mock"
     7  
     8  	peer "github.com/libp2p/go-libp2p/core/peer"
     9  )
    10  
    11  // GossipSubDuplicateMessageTrackerCache is an autogenerated mock type for the GossipSubDuplicateMessageTrackerCache type
    12  type GossipSubDuplicateMessageTrackerCache struct {
    13  	mock.Mock
    14  }
    15  
    16  // Get provides a mock function with given fields: peerId
    17  func (_m *GossipSubDuplicateMessageTrackerCache) Get(peerId peer.ID) (float64, bool, error) {
    18  	ret := _m.Called(peerId)
    19  
    20  	var r0 float64
    21  	var r1 bool
    22  	var r2 error
    23  	if rf, ok := ret.Get(0).(func(peer.ID) (float64, bool, error)); ok {
    24  		return rf(peerId)
    25  	}
    26  	if rf, ok := ret.Get(0).(func(peer.ID) float64); ok {
    27  		r0 = rf(peerId)
    28  	} else {
    29  		r0 = ret.Get(0).(float64)
    30  	}
    31  
    32  	if rf, ok := ret.Get(1).(func(peer.ID) bool); ok {
    33  		r1 = rf(peerId)
    34  	} else {
    35  		r1 = ret.Get(1).(bool)
    36  	}
    37  
    38  	if rf, ok := ret.Get(2).(func(peer.ID) error); ok {
    39  		r2 = rf(peerId)
    40  	} else {
    41  		r2 = ret.Error(2)
    42  	}
    43  
    44  	return r0, r1, r2
    45  }
    46  
    47  // Inc provides a mock function with given fields: peerId
    48  func (_m *GossipSubDuplicateMessageTrackerCache) Inc(peerId peer.ID) (float64, error) {
    49  	ret := _m.Called(peerId)
    50  
    51  	var r0 float64
    52  	var r1 error
    53  	if rf, ok := ret.Get(0).(func(peer.ID) (float64, error)); ok {
    54  		return rf(peerId)
    55  	}
    56  	if rf, ok := ret.Get(0).(func(peer.ID) float64); ok {
    57  		r0 = rf(peerId)
    58  	} else {
    59  		r0 = ret.Get(0).(float64)
    60  	}
    61  
    62  	if rf, ok := ret.Get(1).(func(peer.ID) error); ok {
    63  		r1 = rf(peerId)
    64  	} else {
    65  		r1 = ret.Error(1)
    66  	}
    67  
    68  	return r0, r1
    69  }
    70  
    71  type mockConstructorTestingTNewGossipSubDuplicateMessageTrackerCache interface {
    72  	mock.TestingT
    73  	Cleanup(func())
    74  }
    75  
    76  // NewGossipSubDuplicateMessageTrackerCache creates a new instance of GossipSubDuplicateMessageTrackerCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    77  func NewGossipSubDuplicateMessageTrackerCache(t mockConstructorTestingTNewGossipSubDuplicateMessageTrackerCache) *GossipSubDuplicateMessageTrackerCache {
    78  	mock := &GossipSubDuplicateMessageTrackerCache{}
    79  	mock.Mock.Test(t)
    80  
    81  	t.Cleanup(func() { mock.AssertExpectations(t) })
    82  
    83  	return mock
    84  }