github.com/koko1123/flow-go-1@v0.29.6/state/protocol/mock/mutable_state.go (about)

     1  // Code generated by mockery v2.13.1. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	context "context"
     7  
     8  	flow "github.com/koko1123/flow-go-1/model/flow"
     9  	mock "github.com/stretchr/testify/mock"
    10  
    11  	protocol "github.com/koko1123/flow-go-1/state/protocol"
    12  )
    13  
    14  // MutableState is an autogenerated mock type for the MutableState type
    15  type MutableState struct {
    16  	mock.Mock
    17  }
    18  
    19  // AtBlockID provides a mock function with given fields: blockID
    20  func (_m *MutableState) 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 *MutableState) 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 *MutableState) 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  // Final provides a mock function with given fields:
    66  func (_m *MutableState) Final() protocol.Snapshot {
    67  	ret := _m.Called()
    68  
    69  	var r0 protocol.Snapshot
    70  	if rf, ok := ret.Get(0).(func() protocol.Snapshot); ok {
    71  		r0 = rf()
    72  	} else {
    73  		if ret.Get(0) != nil {
    74  			r0 = ret.Get(0).(protocol.Snapshot)
    75  		}
    76  	}
    77  
    78  	return r0
    79  }
    80  
    81  // Finalize provides a mock function with given fields: ctx, blockID
    82  func (_m *MutableState) Finalize(ctx context.Context, blockID flow.Identifier) error {
    83  	ret := _m.Called(ctx, blockID)
    84  
    85  	var r0 error
    86  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) error); ok {
    87  		r0 = rf(ctx, blockID)
    88  	} else {
    89  		r0 = ret.Error(0)
    90  	}
    91  
    92  	return r0
    93  }
    94  
    95  // MarkValid provides a mock function with given fields: blockID
    96  func (_m *MutableState) MarkValid(blockID flow.Identifier) error {
    97  	ret := _m.Called(blockID)
    98  
    99  	var r0 error
   100  	if rf, ok := ret.Get(0).(func(flow.Identifier) error); ok {
   101  		r0 = rf(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 *MutableState) 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 *MutableState) 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 mockConstructorTestingTNewMutableState interface {
   142  	mock.TestingT
   143  	Cleanup(func())
   144  }
   145  
   146  // NewMutableState creates a new instance of MutableState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   147  func NewMutableState(t mockConstructorTestingTNewMutableState) *MutableState {
   148  	mock := &MutableState{}
   149  	mock.Mock.Test(t)
   150  
   151  	t.Cleanup(func() { mock.AssertExpectations(t) })
   152  
   153  	return mock
   154  }