-
Notifications
You must be signed in to change notification settings - Fork 13
/
sender.go
33 lines (25 loc) · 910 Bytes
/
sender.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package mocks
import (
"github.com/latolukasz/beeorm"
"github.com/stretchr/testify/mock"
"github.com/coretrix/hitrix/service/component/mail"
)
type Sender struct {
mock.Mock
}
func (m *Sender) SendTemplate(_ *beeorm.Engine, message *mail.Message) error {
return m.Called(message.To).Error(0)
}
func (m *Sender) SendTemplateAsync(_ *beeorm.Engine, message *mail.Message) error {
return m.Called(message.To).Error(0)
}
func (m *Sender) SendTemplateWithAttachments(_ *beeorm.Engine, message *mail.MessageAttachment) error {
return m.Called(message.To).Error(0)
}
func (m *Sender) SendTemplateWithAttachmentsAsync(_ *beeorm.Engine, message *mail.MessageAttachment) error {
return m.Called(message.To).Error(0)
}
func (m *Sender) GetTemplateHTMLCode(_ *beeorm.Engine, templateName string, ttl int) (string, error) {
args := m.Called(templateName, ttl)
return args.Get(0).(string), args.Error(1)
}