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