github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/consensus/hotstuff/mocks/packer.go (about)

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	hotstuff "github.com/onflow/flow-go/consensus/hotstuff"
     7  	flow "github.com/onflow/flow-go/model/flow"
     8  
     9  	mock "github.com/stretchr/testify/mock"
    10  )
    11  
    12  // Packer is an autogenerated mock type for the Packer type
    13  type Packer struct {
    14  	mock.Mock
    15  }
    16  
    17  // Pack provides a mock function with given fields: view, sig
    18  func (_m *Packer) Pack(view uint64, sig *hotstuff.BlockSignatureData) ([]byte, []byte, error) {
    19  	ret := _m.Called(view, sig)
    20  
    21  	var r0 []byte
    22  	var r1 []byte
    23  	var r2 error
    24  	if rf, ok := ret.Get(0).(func(uint64, *hotstuff.BlockSignatureData) ([]byte, []byte, error)); ok {
    25  		return rf(view, sig)
    26  	}
    27  	if rf, ok := ret.Get(0).(func(uint64, *hotstuff.BlockSignatureData) []byte); ok {
    28  		r0 = rf(view, sig)
    29  	} else {
    30  		if ret.Get(0) != nil {
    31  			r0 = ret.Get(0).([]byte)
    32  		}
    33  	}
    34  
    35  	if rf, ok := ret.Get(1).(func(uint64, *hotstuff.BlockSignatureData) []byte); ok {
    36  		r1 = rf(view, sig)
    37  	} else {
    38  		if ret.Get(1) != nil {
    39  			r1 = ret.Get(1).([]byte)
    40  		}
    41  	}
    42  
    43  	if rf, ok := ret.Get(2).(func(uint64, *hotstuff.BlockSignatureData) error); ok {
    44  		r2 = rf(view, sig)
    45  	} else {
    46  		r2 = ret.Error(2)
    47  	}
    48  
    49  	return r0, r1, r2
    50  }
    51  
    52  // Unpack provides a mock function with given fields: signerIdentities, sigData
    53  func (_m *Packer) Unpack(signerIdentities flow.GenericIdentityList[flow.IdentitySkeleton], sigData []byte) (*hotstuff.BlockSignatureData, error) {
    54  	ret := _m.Called(signerIdentities, sigData)
    55  
    56  	var r0 *hotstuff.BlockSignatureData
    57  	var r1 error
    58  	if rf, ok := ret.Get(0).(func(flow.GenericIdentityList[flow.IdentitySkeleton], []byte) (*hotstuff.BlockSignatureData, error)); ok {
    59  		return rf(signerIdentities, sigData)
    60  	}
    61  	if rf, ok := ret.Get(0).(func(flow.GenericIdentityList[flow.IdentitySkeleton], []byte) *hotstuff.BlockSignatureData); ok {
    62  		r0 = rf(signerIdentities, sigData)
    63  	} else {
    64  		if ret.Get(0) != nil {
    65  			r0 = ret.Get(0).(*hotstuff.BlockSignatureData)
    66  		}
    67  	}
    68  
    69  	if rf, ok := ret.Get(1).(func(flow.GenericIdentityList[flow.IdentitySkeleton], []byte) error); ok {
    70  		r1 = rf(signerIdentities, sigData)
    71  	} else {
    72  		r1 = ret.Error(1)
    73  	}
    74  
    75  	return r0, r1
    76  }
    77  
    78  type mockConstructorTestingTNewPacker interface {
    79  	mock.TestingT
    80  	Cleanup(func())
    81  }
    82  
    83  // NewPacker creates a new instance of Packer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    84  func NewPacker(t mockConstructorTestingTNewPacker) *Packer {
    85  	mock := &Packer{}
    86  	mock.Mock.Test(t)
    87  
    88  	t.Cleanup(func() { mock.AssertExpectations(t) })
    89  
    90  	return mock
    91  }