github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/state/protocol/mock/participant_state.go (about)

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	context "context"
     7  
     8  	flow "github.com/onflow/flow-go/model/flow"
     9  	mock "github.com/stretchr/testify/mock"
    10  
    11  	protocol "github.com/onflow/flow-go/state/protocol"
    12  )
    13  
    14  // ParticipantState is an autogenerated mock type for the ParticipantState type
    15  type ParticipantState struct {
    16  	mock.Mock
    17  }
    18  
    19  // AtBlockID provides a mock function with given fields: blockID
    20  func (_m *ParticipantState) AtBlockID(blockID flow.Identifier) protocol.Snapshot {
    21  	ret := _m.Called(blockID)
    22  
    23  	var r0 protocol.Snapshot
    24  	if rf, ok := ret.Get(0).(func(flow.Identifier) protocol.Snapshot); ok {
    25  		r0 = rf(blockID)
    26  	} else {
    27  		if ret.Get(0) != nil {
    28  			r0 = ret.Get(0).(protocol.Snapshot)
    29  		}
    30  	}
    31  
    32  	return r0
    33  }
    34  
    35  // AtHeight provides a mock function with given fields: height
    36  func (_m *ParticipantState) AtHeight(height uint64) protocol.Snapshot {
    37  	ret := _m.Called(height)
    38  
    39  	var r0 protocol.Snapshot
    40  	if rf, ok := ret.Get(0).(func(uint64) protocol.Snapshot); ok {
    41  		r0 = rf(height)
    42  	} else {
    43  		if ret.Get(0) != nil {
    44  			r0 = ret.Get(0).(protocol.Snapshot)
    45  		}
    46  	}
    47  
    48  	return r0
    49  }
    50  
    51  // Extend provides a mock function with given fields: ctx, candidate
    52  func (_m *ParticipantState) Extend(ctx context.Context, candidate *flow.Block) error {
    53  	ret := _m.Called(ctx, candidate)
    54  
    55  	var r0 error
    56  	if rf, ok := ret.Get(0).(func(context.Context, *flow.Block) error); ok {
    57  		r0 = rf(ctx, candidate)
    58  	} else {
    59  		r0 = ret.Error(0)
    60  	}
    61  
    62  	return r0
    63  }
    64  
    65  // ExtendCertified provides a mock function with given fields: ctx, candidate, qc
    66  func (_m *ParticipantState) ExtendCertified(ctx context.Context, candidate *flow.Block, qc *flow.QuorumCertificate) error {
    67  	ret := _m.Called(ctx, candidate, qc)
    68  
    69  	var r0 error
    70  	if rf, ok := ret.Get(0).(func(context.Context, *flow.Block, *flow.QuorumCertificate) error); ok {
    71  		r0 = rf(ctx, candidate, qc)
    72  	} else {
    73  		r0 = ret.Error(0)
    74  	}
    75  
    76  	return r0
    77  }
    78  
    79  // Final provides a mock function with given fields:
    80  func (_m *ParticipantState) Final() protocol.Snapshot {
    81  	ret := _m.Called()
    82  
    83  	var r0 protocol.Snapshot
    84  	if rf, ok := ret.Get(0).(func() protocol.Snapshot); ok {
    85  		r0 = rf()
    86  	} else {
    87  		if ret.Get(0) != nil {
    88  			r0 = ret.Get(0).(protocol.Snapshot)
    89  		}
    90  	}
    91  
    92  	return r0
    93  }
    94  
    95  // Finalize provides a mock function with given fields: ctx, blockID
    96  func (_m *ParticipantState) Finalize(ctx context.Context, blockID flow.Identifier) error {
    97  	ret := _m.Called(ctx, blockID)
    98  
    99  	var r0 error
   100  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) error); ok {
   101  		r0 = rf(ctx, blockID)
   102  	} else {
   103  		r0 = ret.Error(0)
   104  	}
   105  
   106  	return r0
   107  }
   108  
   109  // Params provides a mock function with given fields:
   110  func (_m *ParticipantState) Params() protocol.Params {
   111  	ret := _m.Called()
   112  
   113  	var r0 protocol.Params
   114  	if rf, ok := ret.Get(0).(func() protocol.Params); ok {
   115  		r0 = rf()
   116  	} else {
   117  		if ret.Get(0) != nil {
   118  			r0 = ret.Get(0).(protocol.Params)
   119  		}
   120  	}
   121  
   122  	return r0
   123  }
   124  
   125  // Sealed provides a mock function with given fields:
   126  func (_m *ParticipantState) Sealed() protocol.Snapshot {
   127  	ret := _m.Called()
   128  
   129  	var r0 protocol.Snapshot
   130  	if rf, ok := ret.Get(0).(func() protocol.Snapshot); ok {
   131  		r0 = rf()
   132  	} else {
   133  		if ret.Get(0) != nil {
   134  			r0 = ret.Get(0).(protocol.Snapshot)
   135  		}
   136  	}
   137  
   138  	return r0
   139  }
   140  
   141  type mockConstructorTestingTNewParticipantState interface {
   142  	mock.TestingT
   143  	Cleanup(func())
   144  }
   145  
   146  // NewParticipantState creates a new instance of ParticipantState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   147  func NewParticipantState(t mockConstructorTestingTNewParticipantState) *ParticipantState {
   148  	mock := &ParticipantState{}
   149  	mock.Mock.Test(t)
   150  
   151  	t.Cleanup(func() { mock.AssertExpectations(t) })
   152  
   153  	return mock
   154  }