Skip to content
Snippets Groups Projects
Select Git revision
  • 47f159729c32b6572d9aaa590e8a1d079a95f9d4
  • master default protected
  • feature/PRXS-3383-CollectionsSort
  • refactor/PRXS-3053-Files
  • feature/PRXS-3143-3235-ReferenceOptions
  • feature/PRXS-3421-ImplementNewRefAPI
  • feature/PRXS-3143-LimitReferenceFields
  • feature/PRXS-3234-FeaturePruneIdents
  • feature/3149-LocaleCodeAsID-Feature
  • PRXS-3421-RecursiveReferences
  • feature/3109-SerializeFeature
  • release/0.33
  • feature/3109-RecoverySchema
  • feature/3109-feature
  • fix/PRXS-3369-ValidateFields
  • refactor/PRXS-3306-MovePkgGroup1
  • refactor/6-pkg-refactor-expr
  • fix/PRXS-3360-TemplateBuilderPatch
  • feature/3293-MongoV2
  • feature/3272-GoVersionUp
  • feature/PRXS-3218-HideTemplateActions
  • v0.33.1
  • v0.32.0
  • v0.31.1
  • v0.31.0
  • v0.30.0
  • v0.29.0
  • v0.28.0
  • v0.27.0-alpha.1+16
  • v0.27.0-alpha.1+15
  • v0.27.0-alpha.1+14
  • v0.27.0-alpha.1+13
  • v0.27.0-alpha.1+12
  • v0.27.0-alpha.1+11
  • v0.27.0-alpha.1+10
  • v0.27.0-alpha.1+9
  • v0.27.0-alpha.1+8
  • v0.27.0-alpha.1+7
  • v0.27.0-alpha.1+6
  • v0.27.0-alpha.1+5
  • v0.27.0-alpha.1+4
41 results

item_test.go

Blame
  • Clients.go 3.69 KiB
    // Code generated by mockery v2.7.4. DO NOT EDIT.
    
    package mocks
    
    import (
    	context "context"
    
    	clients "git.perx.ru/perxis/perxis-go/pkg/clients"
    	mock "github.com/stretchr/testify/mock"
    )
    
    // Clients is an autogenerated mock type for the Clients type
    type Clients struct {
    	mock.Mock
    }
    
    // Create provides a mock function with given fields: ctx, client
    func (_m *Clients) Create(ctx context.Context, client *clients.Client) (*clients.Client, error) {
    	ret := _m.Called(ctx, client)
    
    	var r0 *clients.Client
    	if rf, ok := ret.Get(0).(func(context.Context, *clients.Client) *clients.Client); ok {
    		r0 = rf(ctx, client)
    	} else {
    		if ret.Get(0) != nil {
    			r0 = ret.Get(0).(*clients.Client)
    		}
    	}
    
    	var r1 error
    	if rf, ok := ret.Get(1).(func(context.Context, *clients.Client) error); ok {
    		r1 = rf(ctx, client)
    	} else {
    		r1 = ret.Error(1)
    	}
    
    	return r0, r1
    }
    
    // Delete provides a mock function with given fields: ctx, spaceId, id
    func (_m *Clients) Delete(ctx context.Context, spaceId string, id string) error {
    	ret := _m.Called(ctx, spaceId, id)
    
    	var r0 error
    	if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
    		r0 = rf(ctx, spaceId, id)
    	} else {
    		r0 = ret.Error(0)
    	}
    
    	return r0
    }
    
    // Enable provides a mock function with given fields: ctx, spaceId, id, enable
    func (_m *Clients) Enable(ctx context.Context, spaceId string, id string, enable bool) error {
    	ret := _m.Called(ctx, spaceId, id, enable)
    
    	var r0 error
    	if rf, ok := ret.Get(0).(func(context.Context, string, string, bool) error); ok {
    		r0 = rf(ctx, spaceId, id, enable)
    	} else {
    		r0 = ret.Error(0)
    	}
    
    	return r0
    }
    
    // Get provides a mock function with given fields: ctx, spaceId, id
    func (_m *Clients) Get(ctx context.Context, spaceId string, id string) (*clients.Client, error) {
    	ret := _m.Called(ctx, spaceId, id)
    
    	var r0 *clients.Client
    	if rf, ok := ret.Get(0).(func(context.Context, string, string) *clients.Client); ok {
    		r0 = rf(ctx, spaceId, id)
    	} else {
    		if ret.Get(0) != nil {
    			r0 = ret.Get(0).(*clients.Client)
    		}
    	}
    
    	var r1 error
    	if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
    		r1 = rf(ctx, spaceId, id)
    	} else {
    		r1 = ret.Error(1)
    	}
    
    	return r0, r1
    }
    
    // GetBy provides a mock function with given fields: ctx, spaceId, params
    func (_m *Clients) GetBy(ctx context.Context, spaceId string, params *clients.GetByParams) (*clients.Client, error) {
    	ret := _m.Called(ctx, spaceId, params)
    
    	var r0 *clients.Client
    	if rf, ok := ret.Get(0).(func(context.Context, string, *clients.GetByParams) *clients.Client); ok {
    		r0 = rf(ctx, spaceId, params)
    	} else {
    		if ret.Get(0) != nil {
    			r0 = ret.Get(0).(*clients.Client)
    		}
    	}
    
    	var r1 error
    	if rf, ok := ret.Get(1).(func(context.Context, string, *clients.GetByParams) error); ok {
    		r1 = rf(ctx, spaceId, params)
    	} else {
    		r1 = ret.Error(1)
    	}
    
    	return r0, r1
    }
    
    // List provides a mock function with given fields: ctx, spaceId
    func (_m *Clients) List(ctx context.Context, spaceId string) ([]*clients.Client, error) {
    	ret := _m.Called(ctx, spaceId)
    
    	var r0 []*clients.Client
    	if rf, ok := ret.Get(0).(func(context.Context, string) []*clients.Client); ok {
    		r0 = rf(ctx, spaceId)
    	} else {
    		if ret.Get(0) != nil {
    			r0 = ret.Get(0).([]*clients.Client)
    		}
    	}
    
    	var r1 error
    	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
    		r1 = rf(ctx, spaceId)
    	} else {
    		r1 = ret.Error(1)
    	}
    
    	return r0, r1
    }
    
    // Update provides a mock function with given fields: ctx, client
    func (_m *Clients) Update(ctx context.Context, client *clients.Client) error {
    	ret := _m.Called(ctx, client)
    
    	var r0 error
    	if rf, ok := ret.Get(0).(func(context.Context, *clients.Client) error); ok {
    		r0 = rf(ctx, client)
    	} else {
    		r0 = ret.Error(0)
    	}
    
    	return r0
    }