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

     1  // Code generated by mockery v2.13.1. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	flow "github.com/koko1123/flow-go-1/model/flow"
     7  	mock "github.com/stretchr/testify/mock"
     8  
     9  	protocol "github.com/koko1123/flow-go-1/state/protocol"
    10  )
    11  
    12  // Snapshot is an autogenerated mock type for the Snapshot type
    13  type Snapshot struct {
    14  	mock.Mock
    15  }
    16  
    17  // Commit provides a mock function with given fields:
    18  func (_m *Snapshot) Commit() (flow.StateCommitment, error) {
    19  	ret := _m.Called()
    20  
    21  	var r0 flow.StateCommitment
    22  	if rf, ok := ret.Get(0).(func() flow.StateCommitment); ok {
    23  		r0 = rf()
    24  	} else {
    25  		if ret.Get(0) != nil {
    26  			r0 = ret.Get(0).(flow.StateCommitment)
    27  		}
    28  	}
    29  
    30  	var r1 error
    31  	if rf, ok := ret.Get(1).(func() error); ok {
    32  		r1 = rf()
    33  	} else {
    34  		r1 = ret.Error(1)
    35  	}
    36  
    37  	return r0, r1
    38  }
    39  
    40  // Descendants provides a mock function with given fields:
    41  func (_m *Snapshot) Descendants() ([]flow.Identifier, error) {
    42  	ret := _m.Called()
    43  
    44  	var r0 []flow.Identifier
    45  	if rf, ok := ret.Get(0).(func() []flow.Identifier); ok {
    46  		r0 = rf()
    47  	} else {
    48  		if ret.Get(0) != nil {
    49  			r0 = ret.Get(0).([]flow.Identifier)
    50  		}
    51  	}
    52  
    53  	var r1 error
    54  	if rf, ok := ret.Get(1).(func() error); ok {
    55  		r1 = rf()
    56  	} else {
    57  		r1 = ret.Error(1)
    58  	}
    59  
    60  	return r0, r1
    61  }
    62  
    63  // Epochs provides a mock function with given fields:
    64  func (_m *Snapshot) Epochs() protocol.EpochQuery {
    65  	ret := _m.Called()
    66  
    67  	var r0 protocol.EpochQuery
    68  	if rf, ok := ret.Get(0).(func() protocol.EpochQuery); ok {
    69  		r0 = rf()
    70  	} else {
    71  		if ret.Get(0) != nil {
    72  			r0 = ret.Get(0).(protocol.EpochQuery)
    73  		}
    74  	}
    75  
    76  	return r0
    77  }
    78  
    79  // Head provides a mock function with given fields:
    80  func (_m *Snapshot) Head() (*flow.Header, error) {
    81  	ret := _m.Called()
    82  
    83  	var r0 *flow.Header
    84  	if rf, ok := ret.Get(0).(func() *flow.Header); ok {
    85  		r0 = rf()
    86  	} else {
    87  		if ret.Get(0) != nil {
    88  			r0 = ret.Get(0).(*flow.Header)
    89  		}
    90  	}
    91  
    92  	var r1 error
    93  	if rf, ok := ret.Get(1).(func() error); ok {
    94  		r1 = rf()
    95  	} else {
    96  		r1 = ret.Error(1)
    97  	}
    98  
    99  	return r0, r1
   100  }
   101  
   102  // Identities provides a mock function with given fields: selector
   103  func (_m *Snapshot) Identities(selector flow.IdentityFilter) (flow.IdentityList, error) {
   104  	ret := _m.Called(selector)
   105  
   106  	var r0 flow.IdentityList
   107  	if rf, ok := ret.Get(0).(func(flow.IdentityFilter) flow.IdentityList); ok {
   108  		r0 = rf(selector)
   109  	} else {
   110  		if ret.Get(0) != nil {
   111  			r0 = ret.Get(0).(flow.IdentityList)
   112  		}
   113  	}
   114  
   115  	var r1 error
   116  	if rf, ok := ret.Get(1).(func(flow.IdentityFilter) error); ok {
   117  		r1 = rf(selector)
   118  	} else {
   119  		r1 = ret.Error(1)
   120  	}
   121  
   122  	return r0, r1
   123  }
   124  
   125  // Identity provides a mock function with given fields: nodeID
   126  func (_m *Snapshot) Identity(nodeID flow.Identifier) (*flow.Identity, error) {
   127  	ret := _m.Called(nodeID)
   128  
   129  	var r0 *flow.Identity
   130  	if rf, ok := ret.Get(0).(func(flow.Identifier) *flow.Identity); ok {
   131  		r0 = rf(nodeID)
   132  	} else {
   133  		if ret.Get(0) != nil {
   134  			r0 = ret.Get(0).(*flow.Identity)
   135  		}
   136  	}
   137  
   138  	var r1 error
   139  	if rf, ok := ret.Get(1).(func(flow.Identifier) error); ok {
   140  		r1 = rf(nodeID)
   141  	} else {
   142  		r1 = ret.Error(1)
   143  	}
   144  
   145  	return r0, r1
   146  }
   147  
   148  // Params provides a mock function with given fields:
   149  func (_m *Snapshot) Params() protocol.GlobalParams {
   150  	ret := _m.Called()
   151  
   152  	var r0 protocol.GlobalParams
   153  	if rf, ok := ret.Get(0).(func() protocol.GlobalParams); ok {
   154  		r0 = rf()
   155  	} else {
   156  		if ret.Get(0) != nil {
   157  			r0 = ret.Get(0).(protocol.GlobalParams)
   158  		}
   159  	}
   160  
   161  	return r0
   162  }
   163  
   164  // Phase provides a mock function with given fields:
   165  func (_m *Snapshot) Phase() (flow.EpochPhase, error) {
   166  	ret := _m.Called()
   167  
   168  	var r0 flow.EpochPhase
   169  	if rf, ok := ret.Get(0).(func() flow.EpochPhase); ok {
   170  		r0 = rf()
   171  	} else {
   172  		r0 = ret.Get(0).(flow.EpochPhase)
   173  	}
   174  
   175  	var r1 error
   176  	if rf, ok := ret.Get(1).(func() error); ok {
   177  		r1 = rf()
   178  	} else {
   179  		r1 = ret.Error(1)
   180  	}
   181  
   182  	return r0, r1
   183  }
   184  
   185  // QuorumCertificate provides a mock function with given fields:
   186  func (_m *Snapshot) QuorumCertificate() (*flow.QuorumCertificate, error) {
   187  	ret := _m.Called()
   188  
   189  	var r0 *flow.QuorumCertificate
   190  	if rf, ok := ret.Get(0).(func() *flow.QuorumCertificate); ok {
   191  		r0 = rf()
   192  	} else {
   193  		if ret.Get(0) != nil {
   194  			r0 = ret.Get(0).(*flow.QuorumCertificate)
   195  		}
   196  	}
   197  
   198  	var r1 error
   199  	if rf, ok := ret.Get(1).(func() error); ok {
   200  		r1 = rf()
   201  	} else {
   202  		r1 = ret.Error(1)
   203  	}
   204  
   205  	return r0, r1
   206  }
   207  
   208  // RandomSource provides a mock function with given fields:
   209  func (_m *Snapshot) RandomSource() ([]byte, error) {
   210  	ret := _m.Called()
   211  
   212  	var r0 []byte
   213  	if rf, ok := ret.Get(0).(func() []byte); ok {
   214  		r0 = rf()
   215  	} else {
   216  		if ret.Get(0) != nil {
   217  			r0 = ret.Get(0).([]byte)
   218  		}
   219  	}
   220  
   221  	var r1 error
   222  	if rf, ok := ret.Get(1).(func() error); ok {
   223  		r1 = rf()
   224  	} else {
   225  		r1 = ret.Error(1)
   226  	}
   227  
   228  	return r0, r1
   229  }
   230  
   231  // SealedResult provides a mock function with given fields:
   232  func (_m *Snapshot) SealedResult() (*flow.ExecutionResult, *flow.Seal, error) {
   233  	ret := _m.Called()
   234  
   235  	var r0 *flow.ExecutionResult
   236  	if rf, ok := ret.Get(0).(func() *flow.ExecutionResult); ok {
   237  		r0 = rf()
   238  	} else {
   239  		if ret.Get(0) != nil {
   240  			r0 = ret.Get(0).(*flow.ExecutionResult)
   241  		}
   242  	}
   243  
   244  	var r1 *flow.Seal
   245  	if rf, ok := ret.Get(1).(func() *flow.Seal); ok {
   246  		r1 = rf()
   247  	} else {
   248  		if ret.Get(1) != nil {
   249  			r1 = ret.Get(1).(*flow.Seal)
   250  		}
   251  	}
   252  
   253  	var r2 error
   254  	if rf, ok := ret.Get(2).(func() error); ok {
   255  		r2 = rf()
   256  	} else {
   257  		r2 = ret.Error(2)
   258  	}
   259  
   260  	return r0, r1, r2
   261  }
   262  
   263  // SealingSegment provides a mock function with given fields:
   264  func (_m *Snapshot) SealingSegment() (*flow.SealingSegment, error) {
   265  	ret := _m.Called()
   266  
   267  	var r0 *flow.SealingSegment
   268  	if rf, ok := ret.Get(0).(func() *flow.SealingSegment); ok {
   269  		r0 = rf()
   270  	} else {
   271  		if ret.Get(0) != nil {
   272  			r0 = ret.Get(0).(*flow.SealingSegment)
   273  		}
   274  	}
   275  
   276  	var r1 error
   277  	if rf, ok := ret.Get(1).(func() error); ok {
   278  		r1 = rf()
   279  	} else {
   280  		r1 = ret.Error(1)
   281  	}
   282  
   283  	return r0, r1
   284  }
   285  
   286  // ValidDescendants provides a mock function with given fields:
   287  func (_m *Snapshot) ValidDescendants() ([]flow.Identifier, error) {
   288  	ret := _m.Called()
   289  
   290  	var r0 []flow.Identifier
   291  	if rf, ok := ret.Get(0).(func() []flow.Identifier); ok {
   292  		r0 = rf()
   293  	} else {
   294  		if ret.Get(0) != nil {
   295  			r0 = ret.Get(0).([]flow.Identifier)
   296  		}
   297  	}
   298  
   299  	var r1 error
   300  	if rf, ok := ret.Get(1).(func() error); ok {
   301  		r1 = rf()
   302  	} else {
   303  		r1 = ret.Error(1)
   304  	}
   305  
   306  	return r0, r1
   307  }
   308  
   309  type mockConstructorTestingTNewSnapshot interface {
   310  	mock.TestingT
   311  	Cleanup(func())
   312  }
   313  
   314  // NewSnapshot creates a new instance of Snapshot. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   315  func NewSnapshot(t mockConstructorTestingTNewSnapshot) *Snapshot {
   316  	mock := &Snapshot{}
   317  	mock.Mock.Test(t)
   318  
   319  	t.Cleanup(func() { mock.AssertExpectations(t) })
   320  
   321  	return mock
   322  }