Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProofsWriterMock ¶
type ProofsWriterMock struct { // ProofCreateFunc mocks the ProofCreate method. ProofCreateFunc func(ctx context.Context, req payd.ProofWrapper) error // contains filtered or unexported fields }
ProofsWriterMock is a mock implementation of payd.ProofsWriter.
func TestSomethingThatUsesProofsWriter(t *testing.T) { // make and configure a mocked payd.ProofsWriter mockedProofsWriter := &ProofsWriterMock{ ProofCreateFunc: func(ctx context.Context, req payd.ProofWrapper) error { panic("mock out the ProofCreate method") }, } // use mockedProofsWriter in code that requires payd.ProofsWriter // and then make assertions. }
func (*ProofsWriterMock) ProofCreate ¶
func (mock *ProofsWriterMock) ProofCreate(ctx context.Context, req payd.ProofWrapper) error
ProofCreate calls ProofCreateFunc.
func (*ProofsWriterMock) ProofCreateCalls ¶
func (mock *ProofsWriterMock) ProofCreateCalls() []struct { Ctx context.Context Req payd.ProofWrapper }
ProofCreateCalls gets all the calls that were made to ProofCreate. Check the length with:
len(mockedProofsWriter.ProofCreateCalls())
Click to show internal directories.
Click to hide internal directories.