Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PaymentRequestServiceMock ¶ added in v0.0.7
type PaymentRequestServiceMock struct {
// PaymentRequestFunc mocks the PaymentRequest method.
PaymentRequestFunc func(ctx context.Context, args p4.PaymentRequestArgs) (*p4.PaymentRequest, error)
// contains filtered or unexported fields
}
PaymentRequestServiceMock is a mock implementation of p4.PaymentRequestService.
func TestSomethingThatUsesPaymentRequestService(t *testing.T) {
// make and configure a mocked p4.PaymentRequestService
mockedPaymentRequestService := &PaymentRequestServiceMock{
PaymentRequestFunc: func(ctx context.Context, args p4.PaymentRequestArgs) (*p4.PaymentRequest, error) {
panic("mock out the PaymentRequest method")
},
}
// use mockedPaymentRequestService in code that requires p4.PaymentRequestService
// and then make assertions.
}
func (*PaymentRequestServiceMock) PaymentRequest ¶ added in v0.0.7
func (mock *PaymentRequestServiceMock) PaymentRequest(ctx context.Context, args p4.PaymentRequestArgs) (*p4.PaymentRequest, error)
PaymentRequest calls PaymentRequestFunc.
func (*PaymentRequestServiceMock) PaymentRequestCalls ¶ added in v0.0.7
func (mock *PaymentRequestServiceMock) PaymentRequestCalls() []struct { Ctx context.Context Args p4.PaymentRequestArgs }
PaymentRequestCalls gets all the calls that were made to PaymentRequest. Check the length with:
len(mockedPaymentRequestService.PaymentRequestCalls())
type PaymentServiceMock ¶ added in v0.0.7
type PaymentServiceMock struct {
// PaymentCreateFunc mocks the PaymentCreate method.
PaymentCreateFunc func(ctx context.Context, args p4.PaymentCreateArgs, req p4.Payment) (*p4.PaymentACK, error)
// contains filtered or unexported fields
}
PaymentServiceMock is a mock implementation of p4.PaymentService.
func TestSomethingThatUsesPaymentService(t *testing.T) {
// make and configure a mocked p4.PaymentService
mockedPaymentService := &PaymentServiceMock{
PaymentCreateFunc: func(ctx context.Context, args p4.PaymentCreateArgs, req p4.Payment) (*p4.PaymentACK, error) {
panic("mock out the PaymentCreate method")
},
}
// use mockedPaymentService in code that requires p4.PaymentService
// and then make assertions.
}
func (*PaymentServiceMock) PaymentCreate ¶ added in v0.0.7
func (mock *PaymentServiceMock) PaymentCreate(ctx context.Context, args p4.PaymentCreateArgs, req p4.Payment) (*p4.PaymentACK, error)
PaymentCreate calls PaymentCreateFunc.
func (*PaymentServiceMock) PaymentCreateCalls ¶ added in v0.0.7
func (mock *PaymentServiceMock) PaymentCreateCalls() []struct { Ctx context.Context Args p4.PaymentCreateArgs Req p4.Payment }
PaymentCreateCalls gets all the calls that were made to PaymentCreate. Check the length with:
len(mockedPaymentService.PaymentCreateCalls())
type PaymentWriterMock ¶
type PaymentWriterMock struct {
// PaymentCreateFunc mocks the PaymentCreate method.
PaymentCreateFunc func(ctx context.Context, args p4.PaymentCreateArgs, req p4.Payment) (*p4.PaymentACK, error)
// contains filtered or unexported fields
}
PaymentWriterMock is a mock implementation of p4.PaymentWriter.
func TestSomethingThatUsesPaymentWriter(t *testing.T) {
// make and configure a mocked p4.PaymentWriter
mockedPaymentWriter := &PaymentWriterMock{
PaymentCreateFunc: func(ctx context.Context, args p4.PaymentCreateArgs, req p4.Payment) (*p4.PaymentACK, error) {
panic("mock out the PaymentCreate method")
},
}
// use mockedPaymentWriter in code that requires p4.PaymentWriter
// and then make assertions.
}
func (*PaymentWriterMock) PaymentCreate ¶
func (mock *PaymentWriterMock) PaymentCreate(ctx context.Context, args p4.PaymentCreateArgs, req p4.Payment) (*p4.PaymentACK, error)
PaymentCreate calls PaymentCreateFunc.
func (*PaymentWriterMock) PaymentCreateCalls ¶
func (mock *PaymentWriterMock) PaymentCreateCalls() []struct { Ctx context.Context Args p4.PaymentCreateArgs Req p4.Payment }
PaymentCreateCalls gets all the calls that were made to PaymentCreate. Check the length with:
len(mockedPaymentWriter.PaymentCreateCalls())
Click to show internal directories.
Click to hide internal directories.