github.com/onflow/flow-go@v0.33.17/state/protocol/mock/block_timer.go (about)

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	mock "github.com/stretchr/testify/mock"
     7  
     8  	time "time"
     9  )
    10  
    11  // BlockTimer is an autogenerated mock type for the BlockTimer type
    12  type BlockTimer struct {
    13  	mock.Mock
    14  }
    15  
    16  // Build provides a mock function with given fields: parentTimestamp
    17  func (_m *BlockTimer) Build(parentTimestamp time.Time) time.Time {
    18  	ret := _m.Called(parentTimestamp)
    19  
    20  	var r0 time.Time
    21  	if rf, ok := ret.Get(0).(func(time.Time) time.Time); ok {
    22  		r0 = rf(parentTimestamp)
    23  	} else {
    24  		r0 = ret.Get(0).(time.Time)
    25  	}
    26  
    27  	return r0
    28  }
    29  
    30  // Validate provides a mock function with given fields: parentTimestamp, currentTimestamp
    31  func (_m *BlockTimer) Validate(parentTimestamp time.Time, currentTimestamp time.Time) error {
    32  	ret := _m.Called(parentTimestamp, currentTimestamp)
    33  
    34  	var r0 error
    35  	if rf, ok := ret.Get(0).(func(time.Time, time.Time) error); ok {
    36  		r0 = rf(parentTimestamp, currentTimestamp)
    37  	} else {
    38  		r0 = ret.Error(0)
    39  	}
    40  
    41  	return r0
    42  }
    43  
    44  type mockConstructorTestingTNewBlockTimer interface {
    45  	mock.TestingT
    46  	Cleanup(func())
    47  }
    48  
    49  // NewBlockTimer creates a new instance of BlockTimer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    50  func NewBlockTimer(t mockConstructorTestingTNewBlockTimer) *BlockTimer {
    51  	mock := &BlockTimer{}
    52  	mock.Mock.Test(t)
    53  
    54  	t.Cleanup(func() { mock.AssertExpectations(t) })
    55  
    56  	return mock
    57  }