X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=inline;f=E2Manager%2Fmocks%2FsdlInstanceMock.go;fp=E2Manager%2Fmocks%2FsdlInstanceMock.go;h=0000000000000000000000000000000000000000;hb=358ea21b00a5d2ccdb9dfa64e416787008d06442;hp=00eea6b74eeef821a55659d5885f839bceac7d96;hpb=3d2b421d8ff9e2a6de7c7e64d51b9e292b05e7c2;p=ric-plt%2Fe2mgr.git diff --git a/E2Manager/mocks/sdlInstanceMock.go b/E2Manager/mocks/sdlInstanceMock.go deleted file mode 100644 index 00eea6b..0000000 --- a/E2Manager/mocks/sdlInstanceMock.go +++ /dev/null @@ -1,136 +0,0 @@ -// -// Copyright 2019 AT&T Intellectual Property -// Copyright 2019 Nokia -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// This source code is part of the near-RT RIC (RAN Intelligent Controller) -// platform project (RICP). - -package mocks - -import "github.com/stretchr/testify/mock" - -type MockSdlInstance struct { - mock.Mock -} - -func (m *MockSdlInstance) SubscribeChannel(cb func(string, ...string), channels ...string) error { - a := m.Called(cb, channels) - return a.Error(0) -} - -func (m *MockSdlInstance) UnsubscribeChannel(channels ...string) error { - a := m.Called(channels) - return a.Error(0) -} - -func (m *MockSdlInstance) SetAndPublish(channelsAndEvents []string, pairs ...interface{}) error { - a := m.Called(channelsAndEvents, pairs) - return a.Error(0) -} - -func (m *MockSdlInstance) SetIfAndPublish(channelsAndEvents []string, key string, oldData, newData interface{}) (bool, error) { - a := m.Called(channelsAndEvents, key, oldData, newData) - return a.Bool(0), a.Error(1) -} - -func (m *MockSdlInstance) SetIfNotExistsAndPublish(channelsAndEvents []string, key string, data interface{}) (bool, error) { - a := m.Called(channelsAndEvents, key, data) - return a.Bool(0), a.Error(1) -} - -func (m *MockSdlInstance) RemoveAndPublish(channelsAndEvents []string, keys []string) error { - a := m.Called(channelsAndEvents, keys) - return a.Error(0) -} - -func (m *MockSdlInstance) RemoveIfAndPublish(channelsAndEvents []string, key string, data interface{}) (bool, error) { - a := m.Called(channelsAndEvents, key, data) - return a.Bool(0), a.Error(1) -} - -func (m *MockSdlInstance) RemoveAllAndPublish(channelsAndEvents []string) error { - a := m.Called(channelsAndEvents) - return a.Error(0) -} - -func (m *MockSdlInstance) Set(pairs ...interface{}) error { - a := m.Called(pairs) - return a.Error(0) -} - -func (m *MockSdlInstance) Get(keys []string) (map[string]interface{}, error) { - a := m.Called(keys) - return a.Get(0).(map[string]interface{}), a.Error(1) -} - -func (m *MockSdlInstance) GetAll() ([]string, error) { - a := m.Called() - return a.Get(0).([]string), a.Error(1) -} - -func (m *MockSdlInstance) Close() error { - a := m.Called() - return a.Error(0) -} - -func (m *MockSdlInstance) Remove(keys []string) error { - a := m.Called(keys) - return a.Error(0) -} - -func (m *MockSdlInstance) RemoveAll() error { - a := m.Called() - return a.Error(0) -} - -func (m *MockSdlInstance) SetIf(key string, oldData, newData interface{}) (bool, error) { - a := m.Called(key, oldData, newData) - return a.Bool(0), a.Error(1) -} - -func (m *MockSdlInstance) SetIfNotExists(key string, data interface{}) (bool, error) { - a := m.Called(key, data) - return a.Bool(0), a.Error(1) -} -func (m *MockSdlInstance) RemoveIf(key string, data interface{}) (bool, error) { - a := m.Called(key, data) - return a.Bool(0), a.Error(1) -} - -func (m *MockSdlInstance) AddMember(group string, member ...interface{}) error{ - a := m.Called(group, member) - return a.Error(0) -} - -func (m *MockSdlInstance) RemoveMember(group string, member ...interface{}) error { - a := m.Called(group, member) - return a.Error(0) -} -func (m *MockSdlInstance) RemoveGroup(group string) error { - a := m.Called(group) - return a.Error(0) -} -func (m *MockSdlInstance) GetMembers(group string) ([]string, error) { - a := m.Called(group) - return a.Get(0).([]string), a.Error(1) -} -func (m *MockSdlInstance) IsMember(group string, member interface{}) (bool, error){ - a := m.Called(group, member) - return a.Bool(0), a.Error(1) -} -func (m *MockSdlInstance) GroupSize(group string) (int64, error){ - a := m.Called(group,) - return int64(a.Int(0)), a.Error(1) -}