Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmailSenderMock ¶
type EmailSenderMock struct { // SendFunc mocks the Send method. SendFunc func(from string, to []string, msg []byte) error // contains filtered or unexported fields }
EmailSenderMock is a mock implementation of api.EmailSender.
func TestSomethingThatUsesEmailSender(t *testing.T) { // make and configure a mocked api.EmailSender mockedEmailSender := &EmailSenderMock{ SendFunc: func(from string, to []string, msg []byte) error { panic("mock out the Send method") }, } // use mockedEmailSender in code that requires api.EmailSender // and then make assertions. }
Click to show internal directories.
Click to hide internal directories.