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/OAuthStore.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/OAuthStore.go')
-rw-r--r-- | store/storetest/mocks/OAuthStore.go | 302 |
1 files changed, 302 insertions, 0 deletions
diff --git a/store/storetest/mocks/OAuthStore.go b/store/storetest/mocks/OAuthStore.go new file mode 100644 index 000000000..fb49d715d --- /dev/null +++ b/store/storetest/mocks/OAuthStore.go @@ -0,0 +1,302 @@ +// 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" + +// OAuthStore is an autogenerated mock type for the OAuthStore type +type OAuthStore struct { + mock.Mock +} + +// DeleteApp provides a mock function with given fields: id +func (_m *OAuthStore) DeleteApp(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 +} + +// GetAccessData provides a mock function with given fields: token +func (_m *OAuthStore) GetAccessData(token string) store.StoreChannel { + ret := _m.Called(token) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { + r0 = rf(token) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// GetAccessDataByRefreshToken provides a mock function with given fields: token +func (_m *OAuthStore) GetAccessDataByRefreshToken(token string) store.StoreChannel { + ret := _m.Called(token) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { + r0 = rf(token) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// GetAccessDataByUserForApp provides a mock function with given fields: userId, clientId +func (_m *OAuthStore) GetAccessDataByUserForApp(userId string, clientId string) store.StoreChannel { + ret := _m.Called(userId, clientId) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok { + r0 = rf(userId, clientId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// GetApp provides a mock function with given fields: id +func (_m *OAuthStore) GetApp(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 +} + +// GetAppByUser provides a mock function with given fields: userId, offset, limit +func (_m *OAuthStore) GetAppByUser(userId string, offset int, limit int) store.StoreChannel { + ret := _m.Called(userId, offset, limit) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(string, int, int) store.StoreChannel); ok { + r0 = rf(userId, offset, limit) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// GetApps provides a mock function with given fields: offset, limit +func (_m *OAuthStore) GetApps(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 +} + +// GetAuthData provides a mock function with given fields: code +func (_m *OAuthStore) GetAuthData(code string) store.StoreChannel { + ret := _m.Called(code) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { + r0 = rf(code) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// GetAuthorizedApps provides a mock function with given fields: userId, offset, limit +func (_m *OAuthStore) GetAuthorizedApps(userId string, offset int, limit int) store.StoreChannel { + ret := _m.Called(userId, offset, limit) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(string, int, int) store.StoreChannel); ok { + r0 = rf(userId, offset, limit) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// GetPreviousAccessData provides a mock function with given fields: userId, clientId +func (_m *OAuthStore) GetPreviousAccessData(userId string, clientId string) store.StoreChannel { + ret := _m.Called(userId, clientId) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok { + r0 = rf(userId, clientId) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// PermanentDeleteAuthDataByUser provides a mock function with given fields: userId +func (_m *OAuthStore) PermanentDeleteAuthDataByUser(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 +} + +// RemoveAccessData provides a mock function with given fields: token +func (_m *OAuthStore) RemoveAccessData(token string) store.StoreChannel { + ret := _m.Called(token) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { + r0 = rf(token) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// RemoveAuthData provides a mock function with given fields: code +func (_m *OAuthStore) RemoveAuthData(code string) store.StoreChannel { + ret := _m.Called(code) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { + r0 = rf(code) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// SaveAccessData provides a mock function with given fields: accessData +func (_m *OAuthStore) SaveAccessData(accessData *model.AccessData) store.StoreChannel { + ret := _m.Called(accessData) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(*model.AccessData) store.StoreChannel); ok { + r0 = rf(accessData) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// SaveApp provides a mock function with given fields: app +func (_m *OAuthStore) SaveApp(app *model.OAuthApp) store.StoreChannel { + ret := _m.Called(app) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(*model.OAuthApp) store.StoreChannel); ok { + r0 = rf(app) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// SaveAuthData provides a mock function with given fields: authData +func (_m *OAuthStore) SaveAuthData(authData *model.AuthData) store.StoreChannel { + ret := _m.Called(authData) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(*model.AuthData) store.StoreChannel); ok { + r0 = rf(authData) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// UpdateAccessData provides a mock function with given fields: accessData +func (_m *OAuthStore) UpdateAccessData(accessData *model.AccessData) store.StoreChannel { + ret := _m.Called(accessData) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(*model.AccessData) store.StoreChannel); ok { + r0 = rf(accessData) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + +// UpdateApp provides a mock function with given fields: app +func (_m *OAuthStore) UpdateApp(app *model.OAuthApp) store.StoreChannel { + ret := _m.Called(app) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(*model.OAuthApp) store.StoreChannel); ok { + r0 = rf(app) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} |