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

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mockp2p
     4  
     5  import (
     6  	irrecoverable "github.com/onflow/flow-go/module/irrecoverable"
     7  	mock "github.com/stretchr/testify/mock"
     8  
     9  	pubsub "github.com/libp2p/go-libp2p-pubsub"
    10  )
    11  
    12  // ScoreOptionBuilder is an autogenerated mock type for the ScoreOptionBuilder type
    13  type ScoreOptionBuilder struct {
    14  	mock.Mock
    15  }
    16  
    17  // BuildFlowPubSubScoreOption provides a mock function with given fields:
    18  func (_m *ScoreOptionBuilder) BuildFlowPubSubScoreOption() (*pubsub.PeerScoreParams, *pubsub.PeerScoreThresholds) {
    19  	ret := _m.Called()
    20  
    21  	var r0 *pubsub.PeerScoreParams
    22  	var r1 *pubsub.PeerScoreThresholds
    23  	if rf, ok := ret.Get(0).(func() (*pubsub.PeerScoreParams, *pubsub.PeerScoreThresholds)); ok {
    24  		return rf()
    25  	}
    26  	if rf, ok := ret.Get(0).(func() *pubsub.PeerScoreParams); ok {
    27  		r0 = rf()
    28  	} else {
    29  		if ret.Get(0) != nil {
    30  			r0 = ret.Get(0).(*pubsub.PeerScoreParams)
    31  		}
    32  	}
    33  
    34  	if rf, ok := ret.Get(1).(func() *pubsub.PeerScoreThresholds); ok {
    35  		r1 = rf()
    36  	} else {
    37  		if ret.Get(1) != nil {
    38  			r1 = ret.Get(1).(*pubsub.PeerScoreThresholds)
    39  		}
    40  	}
    41  
    42  	return r0, r1
    43  }
    44  
    45  // Done provides a mock function with given fields:
    46  func (_m *ScoreOptionBuilder) Done() <-chan struct{} {
    47  	ret := _m.Called()
    48  
    49  	var r0 <-chan struct{}
    50  	if rf, ok := ret.Get(0).(func() <-chan struct{}); ok {
    51  		r0 = rf()
    52  	} else {
    53  		if ret.Get(0) != nil {
    54  			r0 = ret.Get(0).(<-chan struct{})
    55  		}
    56  	}
    57  
    58  	return r0
    59  }
    60  
    61  // Ready provides a mock function with given fields:
    62  func (_m *ScoreOptionBuilder) Ready() <-chan struct{} {
    63  	ret := _m.Called()
    64  
    65  	var r0 <-chan struct{}
    66  	if rf, ok := ret.Get(0).(func() <-chan struct{}); ok {
    67  		r0 = rf()
    68  	} else {
    69  		if ret.Get(0) != nil {
    70  			r0 = ret.Get(0).(<-chan struct{})
    71  		}
    72  	}
    73  
    74  	return r0
    75  }
    76  
    77  // Start provides a mock function with given fields: _a0
    78  func (_m *ScoreOptionBuilder) Start(_a0 irrecoverable.SignalerContext) {
    79  	_m.Called(_a0)
    80  }
    81  
    82  // TopicScoreParams provides a mock function with given fields: _a0
    83  func (_m *ScoreOptionBuilder) TopicScoreParams(_a0 *pubsub.Topic) *pubsub.TopicScoreParams {
    84  	ret := _m.Called(_a0)
    85  
    86  	var r0 *pubsub.TopicScoreParams
    87  	if rf, ok := ret.Get(0).(func(*pubsub.Topic) *pubsub.TopicScoreParams); ok {
    88  		r0 = rf(_a0)
    89  	} else {
    90  		if ret.Get(0) != nil {
    91  			r0 = ret.Get(0).(*pubsub.TopicScoreParams)
    92  		}
    93  	}
    94  
    95  	return r0
    96  }
    97  
    98  type mockConstructorTestingTNewScoreOptionBuilder interface {
    99  	mock.TestingT
   100  	Cleanup(func())
   101  }
   102  
   103  // NewScoreOptionBuilder creates a new instance of ScoreOptionBuilder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   104  func NewScoreOptionBuilder(t mockConstructorTestingTNewScoreOptionBuilder) *ScoreOptionBuilder {
   105  	mock := &ScoreOptionBuilder{}
   106  	mock.Mock.Test(t)
   107  
   108  	t.Cleanup(func() { mock.AssertExpectations(t) })
   109  
   110  	return mock
   111  }