diff options
author | Chris <ccbrown112@gmail.com> | 2017-10-26 11:36:54 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-26 11:36:54 -0500 |
commit | 6f6005c617799e2f51071f43af718e5d4e77492b (patch) | |
tree | 0928b6705aa5db61d73845d28436e909d2b273a2 /store/storetest/mocks/WebhookStore.go | |
parent | ab7e5b35d88dd0ae403c1f656fd72e9a3b46cdab (diff) | |
download | chat-6f6005c617799e2f51071f43af718e5d4e77492b.tar.gz chat-6f6005c617799e2f51071f43af718e5d4e77492b.tar.bz2 chat-6f6005c617799e2f51071f43af718e5d4e77492b.zip |
Store mocks (#7724)
* store mocks
* add example
Diffstat (limited to 'store/storetest/mocks/WebhookStore.go')
-rw-r--r-- | store/storetest/mocks/WebhookStore.go | 339 |
1 files changed, 339 insertions, 0 deletions
diff --git a/store/storetest/mocks/WebhookStore.go b/store/storetest/mocks/WebhookStore.go new file mode 100644 index 000000000..aa66e0600 --- /dev/null +++ b/store/storetest/mocks/WebhookStore.go @@ -0,0 +1,339 @@ +// Code generated by mockery v1.0.0 + +// Regenerate this file using `make store-mocks`. + +package mocks + +import mock "github.com/stretchr/testify/mock" +import model "github.com/mattermost/mattermost-server/model" +import store "github.com/mattermost/mattermost-server/store" + +// WebhookStore is an autogenerated mock type for the WebhookStore type +type WebhookStore struct { + mock.Mock +} + +// AnalyticsIncomingCount provides a mock function with given fields: teamId +func (_m *WebhookStore) AnalyticsIncomingCount(teamId string) store.StoreChannel { + ret := _m.Called(teamId) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { + r0 = rf(teamId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// AnalyticsOutgoingCount provides a mock function with given fields: teamId +func (_m *WebhookStore) AnalyticsOutgoingCount(teamId string) store.StoreChannel { + ret := _m.Called(teamId) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { + r0 = rf(teamId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// DeleteIncoming provides a mock function with given fields: webhookId, time +func (_m *WebhookStore) DeleteIncoming(webhookId string, time int64) store.StoreChannel { + ret := _m.Called(webhookId, time) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(string, int64) store.StoreChannel); ok { + r0 = rf(webhookId, time) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// DeleteOutgoing provides a mock function with given fields: webhookId, time +func (_m *WebhookStore) DeleteOutgoing(webhookId string, time int64) store.StoreChannel { + ret := _m.Called(webhookId, time) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(string, int64) store.StoreChannel); ok { + r0 = rf(webhookId, time) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// GetIncoming provides a mock function with given fields: id, allowFromCache +func (_m *WebhookStore) GetIncoming(id string, allowFromCache bool) store.StoreChannel { + ret := _m.Called(id, allowFromCache) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(string, bool) store.StoreChannel); ok { + r0 = rf(id, allowFromCache) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// GetIncomingByChannel provides a mock function with given fields: channelId +func (_m *WebhookStore) GetIncomingByChannel(channelId string) store.StoreChannel { + ret := _m.Called(channelId) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { + r0 = rf(channelId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// GetIncomingByTeam provides a mock function with given fields: teamId, offset, limit +func (_m *WebhookStore) GetIncomingByTeam(teamId string, offset int, limit int) store.StoreChannel { + ret := _m.Called(teamId, offset, limit) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(string, int, int) store.StoreChannel); ok { + r0 = rf(teamId, offset, limit) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// GetIncomingList provides a mock function with given fields: offset, limit +func (_m *WebhookStore) GetIncomingList(offset int, limit int) store.StoreChannel { + ret := _m.Called(offset, limit) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(int, int) store.StoreChannel); ok { + r0 = rf(offset, limit) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// GetOutgoing provides a mock function with given fields: id +func (_m *WebhookStore) GetOutgoing(id string) store.StoreChannel { + ret := _m.Called(id) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { + r0 = rf(id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// GetOutgoingByChannel provides a mock function with given fields: channelId, offset, limit +func (_m *WebhookStore) GetOutgoingByChannel(channelId string, offset int, limit int) store.StoreChannel { + ret := _m.Called(channelId, offset, limit) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(string, int, int) store.StoreChannel); ok { + r0 = rf(channelId, offset, limit) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// GetOutgoingByTeam provides a mock function with given fields: teamId, offset, limit +func (_m *WebhookStore) GetOutgoingByTeam(teamId string, offset int, limit int) store.StoreChannel { + ret := _m.Called(teamId, offset, limit) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(string, int, int) store.StoreChannel); ok { + r0 = rf(teamId, offset, limit) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// GetOutgoingList provides a mock function with given fields: offset, limit +func (_m *WebhookStore) GetOutgoingList(offset int, limit int) store.StoreChannel { + ret := _m.Called(offset, limit) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(int, int) store.StoreChannel); ok { + r0 = rf(offset, limit) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// InvalidateWebhookCache provides a mock function with given fields: webhook +func (_m *WebhookStore) InvalidateWebhookCache(webhook string) { + _m.Called(webhook) +} + +// PermanentDeleteIncomingByChannel provides a mock function with given fields: channelId +func (_m *WebhookStore) PermanentDeleteIncomingByChannel(channelId string) store.StoreChannel { + ret := _m.Called(channelId) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { + r0 = rf(channelId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// PermanentDeleteIncomingByUser provides a mock function with given fields: userId +func (_m *WebhookStore) PermanentDeleteIncomingByUser(userId string) store.StoreChannel { + ret := _m.Called(userId) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { + r0 = rf(userId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// PermanentDeleteOutgoingByChannel provides a mock function with given fields: channelId +func (_m *WebhookStore) PermanentDeleteOutgoingByChannel(channelId string) store.StoreChannel { + ret := _m.Called(channelId) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { + r0 = rf(channelId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// PermanentDeleteOutgoingByUser provides a mock function with given fields: userId +func (_m *WebhookStore) PermanentDeleteOutgoingByUser(userId string) store.StoreChannel { + ret := _m.Called(userId) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { + r0 = rf(userId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// SaveIncoming provides a mock function with given fields: webhook +func (_m *WebhookStore) SaveIncoming(webhook *model.IncomingWebhook) store.StoreChannel { + ret := _m.Called(webhook) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(*model.IncomingWebhook) store.StoreChannel); ok { + r0 = rf(webhook) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// SaveOutgoing provides a mock function with given fields: webhook +func (_m *WebhookStore) SaveOutgoing(webhook *model.OutgoingWebhook) store.StoreChannel { + ret := _m.Called(webhook) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(*model.OutgoingWebhook) store.StoreChannel); ok { + r0 = rf(webhook) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// UpdateIncoming provides a mock function with given fields: webhook +func (_m *WebhookStore) UpdateIncoming(webhook *model.IncomingWebhook) store.StoreChannel { + ret := _m.Called(webhook) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(*model.IncomingWebhook) store.StoreChannel); ok { + r0 = rf(webhook) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// UpdateOutgoing provides a mock function with given fields: hook +func (_m *WebhookStore) UpdateOutgoing(hook *model.OutgoingWebhook) store.StoreChannel { + ret := _m.Called(hook) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(*model.OutgoingWebhook) store.StoreChannel); ok { + r0 = rf(hook) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} |