Commit 014a0c66 authored by Adphi's avatar Adphi
Browse files

Added mocks

parent 557d7213
Pipeline #595 passed with stage
in 6 minutes and 45 seconds
// Code generated by mockery v1.0.0. DO NOT EDIT.
package mocks
import mock "github.com/stretchr/testify/mock"
import types "gitlab.bertha.cloud/partitio/Nextcloud-Partitio/gonextcloud/types"
// Apps is an autogenerated mock type for the Apps type
type Apps struct {
mock.Mock
}
// Disable provides a mock function with given fields: name
func (_m *Apps) Disable(name string) error {
ret := _m.Called(name)
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(name)
} else {
r0 = ret.Error(0)
}
return r0
}
// Enable provides a mock function with given fields: name
func (_m *Apps) Enable(name string) error {
ret := _m.Called(name)
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(name)
} else {
r0 = ret.Error(0)
}
return r0
}
// Infos provides a mock function with given fields: name
func (_m *Apps) Infos(name string) (types.App, error) {
ret := _m.Called(name)
var r0 types.App
if rf, ok := ret.Get(0).(func(string) types.App); ok {
r0 = rf(name)
} else {
r0 = ret.Get(0).(types.App)
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(name)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// List provides a mock function with given fields:
func (_m *Apps) List() ([]string, error) {
ret := _m.Called()
var r0 []string
if rf, ok := ret.Get(0).(func() []string); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ListDisabled provides a mock function with given fields:
func (_m *Apps) ListDisabled() ([]string, error) {
ret := _m.Called()
var r0 []string
if rf, ok := ret.Get(0).(func() []string); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ListEnabled provides a mock function with given fields:
func (_m *Apps) ListEnabled() ([]string, error) {
ret := _m.Called()
var r0 []string
if rf, ok := ret.Get(0).(func() []string); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Code generated by mockery v1.0.0. DO NOT EDIT.
package mocks
import mock "github.com/stretchr/testify/mock"
// AppsConfig is an autogenerated mock type for the AppsConfig type
type AppsConfig struct {
mock.Mock
}
// DeleteValue provides a mock function with given fields: id, key, value
func (_m *AppsConfig) DeleteValue(id string, key string, value string) error {
ret := _m.Called(id, key, value)
var r0 error
if rf, ok := ret.Get(0).(func(string, string, string) error); ok {
r0 = rf(id, key, value)
} else {
r0 = ret.Error(0)
}
return r0
}
// Details provides a mock function with given fields: appID
func (_m *AppsConfig) Details(appID string) (map[string]string, error) {
ret := _m.Called(appID)
var r0 map[string]string
if rf, ok := ret.Get(0).(func(string) map[string]string); ok {
r0 = rf(appID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(map[string]string)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(appID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Get provides a mock function with given fields:
func (_m *AppsConfig) Get() (map[string]map[string]string, error) {
ret := _m.Called()
var r0 map[string]map[string]string
if rf, ok := ret.Get(0).(func() map[string]map[string]string); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(map[string]map[string]string)
}
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Keys provides a mock function with given fields: id
func (_m *AppsConfig) Keys(id string) ([]string, error) {
ret := _m.Called(id)
var r0 []string
if rf, ok := ret.Get(0).(func(string) []string); ok {
r0 = rf(id)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(id)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// List provides a mock function with given fields:
func (_m *AppsConfig) List() ([]string, error) {
ret := _m.Called()
var r0 []string
if rf, ok := ret.Get(0).(func() []string); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// SetValue provides a mock function with given fields: id, key, value
func (_m *AppsConfig) SetValue(id string, key string, value string) error {
ret := _m.Called(id, key, value)
var r0 error
if rf, ok := ret.Get(0).(func(string, string, string) error); ok {
r0 = rf(id, key, value)
} else {
r0 = ret.Error(0)
}
return r0
}
// Value provides a mock function with given fields: id, key
func (_m *AppsConfig) Value(id string, key string) (string, error) {
ret := _m.Called(id, key)
var r0 string
if rf, ok := ret.Get(0).(func(string, string) string); ok {
r0 = rf(id, key)
} else {
r0 = ret.Get(0).(string)
}
var r1 error
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(id, key)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Code generated by mockery v1.0.0. DO NOT EDIT.
package mocks
import mock "github.com/stretchr/testify/mock"
// Auth is an autogenerated mock type for the Auth type
type Auth struct {
mock.Mock
}
// Login provides a mock function with given fields: username, password
func (_m *Auth) Login(username string, password string) error {
ret := _m.Called(username, password)
var r0 error
if rf, ok := ret.Get(0).(func(string, string) error); ok {
r0 = rf(username, password)
} else {
r0 = ret.Error(0)
}
return r0
}
// Logout provides a mock function with given fields:
func (_m *Auth) Logout() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}
package mocks
import mock "github.com/stretchr/testify/mock"
import types "gitlab.bertha.cloud/partitio/Nextcloud-Partitio/gonextcloud/types"
// Client is an autogenerated mock type for the Client type
type Client struct {
mock.Mock
}
// Apps provides a mock function with given fields:
func (_m *Client) Apps() types.Apps {
return new(Apps)
}
// AppsConfig provides a mock function with given fields:
func (_m *Client) AppsConfig() types.AppsConfig {
return new(AppsConfig)
}
// GroupFolders provides a mock function with given fields:
func (_m *Client) GroupFolders() types.GroupFolders {
return new(GroupFolders)
}
// Groups provides a mock function with given fields:
func (_m *Client) Groups() types.Groups {
return new(Groups)
}
// Notifications provides a mock function with given fields:
func (_m *Client) Notifications() types.Notifications {
return new(Notifications)
}
// Shares provides a mock function with given fields:
func (_m *Client) Shares() types.Shares {
return new(Shares)
}
// Users provides a mock function with given fields:
func (_m *Client) Users() types.Users {
return new(Users)
}
// Code generated by mockery v1.0.0. DO NOT EDIT.
package mocks
import mock "github.com/stretchr/testify/mock"
import types "gitlab.bertha.cloud/partitio/Nextcloud-Partitio/gonextcloud/types"
// GroupFolders is an autogenerated mock type for the GroupFolders type
type GroupFolders struct {
mock.Mock
}
// AddGroup provides a mock function with given fields: folderID, groupName
func (_m *GroupFolders) AddGroup(folderID int, groupName string) error {
ret := _m.Called(folderID, groupName)
var r0 error
if rf, ok := ret.Get(0).(func(int, string) error); ok {
r0 = rf(folderID, groupName)
} else {
r0 = ret.Error(0)
}
return r0
}
// Create provides a mock function with given fields: name
func (_m *GroupFolders) Create(name string) (int, error) {
ret := _m.Called(name)
var r0 int
if rf, ok := ret.Get(0).(func(string) int); ok {
r0 = rf(name)
} else {
r0 = ret.Get(0).(int)
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(name)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Get provides a mock function with given fields: id
func (_m *GroupFolders) Get(id int) (types.GroupFolder, error) {
ret := _m.Called(id)
var r0 types.GroupFolder
if rf, ok := ret.Get(0).(func(int) types.GroupFolder); ok {
r0 = rf(id)
} else {
r0 = ret.Get(0).(types.GroupFolder)
}
var r1 error
if rf, ok := ret.Get(1).(func(int) error); ok {
r1 = rf(id)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// List provides a mock function with given fields:
func (_m *GroupFolders) List() (map[int]types.GroupFolder, error) {
ret := _m.Called()
var r0 map[int]types.GroupFolder
if rf, ok := ret.Get(0).(func() map[int]types.GroupFolder); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(map[int]types.GroupFolder)
}
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// RemoveGroup provides a mock function with given fields: folderID, groupName
func (_m *GroupFolders) RemoveGroup(folderID int, groupName string) error {
ret := _m.Called(folderID, groupName)
var r0 error
if rf, ok := ret.Get(0).(func(int, string) error); ok {
r0 = rf(folderID, groupName)
} else {
r0 = ret.Error(0)
}
return r0
}
// Rename provides a mock function with given fields: groupID, name
func (_m *GroupFolders) Rename(groupID int, name string) error {
ret := _m.Called(groupID, name)
var r0 error
if rf, ok := ret.Get(0).(func(int, string) error); ok {
r0 = rf(groupID, name)
} else {
r0 = ret.Error(0)
}
return r0
}
// SetGroupPermissions provides a mock function with given fields: folderID, groupName, permission
func (_m *GroupFolders) SetGroupPermissions(folderID int, groupName string, permission types.SharePermission) error {
ret := _m.Called(folderID, groupName, permission)
var r0 error
if rf, ok := ret.Get(0).(func(int, string, types.SharePermission) error); ok {
r0 = rf(folderID, groupName, permission)
} else {
r0 = ret.Error(0)
}
return r0
}
// SetQuota provides a mock function with given fields: folderID, quota
func (_m *GroupFolders) SetQuota(folderID int, quota int) error {
ret := _m.Called(folderID, quota)
var r0 error
if rf, ok := ret.Get(0).(func(int, int) error); ok {
r0 = rf(folderID, quota)
} else {
r0 = ret.Error(0)
}
return r0
}
// Code generated by mockery v1.0.0. DO NOT EDIT.
package mocks
import mock "github.com/stretchr/testify/mock"
import types "gitlab.bertha.cloud/partitio/Nextcloud-Partitio/gonextcloud/types"
// Groups is an autogenerated mock type for the Groups type
type Groups struct {
mock.Mock
}
// Create provides a mock function with given fields: name
func (_m *Groups) Create(name string) error {
ret := _m.Called(name)
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(name)
} else {
r0 = ret.Error(0)
}
return r0
}
// Delete provides a mock function with given fields: name
func (_m *Groups) Delete(name string) error {
ret := _m.Called(name)
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(name)
} else {
r0 = ret.Error(0)
}
return r0
}
// List provides a mock function with given fields:
func (_m *Groups) List() ([]string, error) {
ret := _m.Called()
var r0 []string
if rf, ok := ret.Get(0).(func() []string); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ListDetails provides a mock function with given fields:
func (_m *Groups) ListDetails() ([]types.Group, error) {
ret := _m.Called()
var r0 []types.Group
if rf, ok := ret.Get(0).(func() []types.Group); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]types.Group)
}
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Search provides a mock function with given fields: search
func (_m *Groups) Search(search string) ([]string, error) {
ret := _m.Called(search)
var r0 []string
if rf, ok := ret.Get(0).(func(string) []string); ok {
r0 = rf(search)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}