mirror of
https://github.com/nikoksr/notify.git
synced 2025-01-10 00:28:36 +02:00
d2dfd10850
* feat(service): implemented matrix service * docs(readme): add matrix service * chore(format) Reformatted with gofumpt * docs(readme): updated readme and added doc * chore(rename): Rename functions to be compliant with project style * chore(formatting): Reformatted docs * docs(changes): Modified the service and path to it in the documentation. * chore(format): Reformated with Gofump
63 lines
1.8 KiB
Go
63 lines
1.8 KiB
Go
// Code generated by mockery v2.14.0. DO NOT EDIT.
|
|
|
|
package matrix
|
|
|
|
import (
|
|
event "maunium.net/go/mautrix/event"
|
|
id "maunium.net/go/mautrix/id"
|
|
|
|
mautrix "maunium.net/go/mautrix"
|
|
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// mockMatrixClient is an autogenerated mock type for the matrixClient type
|
|
type mockMatrixClient struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// SendMessageEvent provides a mock function with given fields: roomID, eventType, contentJSON, extra
|
|
func (_m *mockMatrixClient) SendMessageEvent(roomID id.RoomID, eventType event.Type, contentJSON interface{}, extra ...mautrix.ReqSendEvent) (*mautrix.RespSendEvent, error) {
|
|
_va := make([]interface{}, len(extra))
|
|
for _i := range extra {
|
|
_va[_i] = extra[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, roomID, eventType, contentJSON)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
var r0 *mautrix.RespSendEvent
|
|
if rf, ok := ret.Get(0).(func(id.RoomID, event.Type, interface{}, ...mautrix.ReqSendEvent) *mautrix.RespSendEvent); ok {
|
|
r0 = rf(roomID, eventType, contentJSON, extra...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*mautrix.RespSendEvent)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(id.RoomID, event.Type, interface{}, ...mautrix.ReqSendEvent) error); ok {
|
|
r1 = rf(roomID, eventType, contentJSON, extra...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
type mockConstructorTestingTnewMockMatrixClient interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}
|
|
|
|
// newMockMatrixClient creates a new instance of mockMatrixClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
func newMockMatrixClient(t mockConstructorTestingTnewMockMatrixClient) *mockMatrixClient {
|
|
mock := &mockMatrixClient{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|