2 // Copyright 2019 AT&T Intellectual Property
3 // Copyright 2019 Nokia
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 // This source code is part of the near-RT RIC (RAN Intelligent Controller)
19 // platform project (RICP).
24 "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities"
25 "github.com/stretchr/testify/mock"
28 type E2TInstancesManagerMock struct {
32 func (m *E2TInstancesManagerMock) GetE2TInstance(e2tAddress string) (*entities.E2TInstance, error) {
33 args := m.Called(e2tAddress)
35 return args.Get(0).(*entities.E2TInstance), args.Error(1)
38 func (m *E2TInstancesManagerMock) AddE2TInstance(e2tInstanceAddress string) error {
39 args := m.Called(e2tInstanceAddress)
43 func (m *E2TInstancesManagerMock) RemoveE2TInstance(e2tAddress string) error {
44 args := m.Called(e2tAddress)
48 func (m *E2TInstancesManagerMock) SelectE2TInstance() (string, error) {
50 return args.String(0), args.Error(1)
53 func (m *E2TInstancesManagerMock) AddRansToInstance(e2tAddress string, ranNames []string) error {
54 args := m.Called(e2tAddress, ranNames)
59 func (m *E2TInstancesManagerMock) RemoveRanFromInstance(ranName string, e2tAddress string) error {
60 args := m.Called(ranName, e2tAddress)
65 func (m *E2TInstancesManagerMock) GetE2TInstances() ([]*entities.E2TInstance, error) {
68 return args.Get(0).([]*entities.E2TInstance), args.Error(1)
71 func (m *E2TInstancesManagerMock) GetE2TInstancesNoLogs() ([]*entities.E2TInstance, error) {
74 return args.Get(0).([]*entities.E2TInstance), args.Error(1)
77 func (m *E2TInstancesManagerMock) ResetKeepAliveTimestamp(e2tAddress string) error {
78 args := m.Called(e2tAddress)
83 func (m *E2TInstancesManagerMock) SetE2tInstanceState(e2tAddress string, currentState entities.E2TInstanceState, newState entities.E2TInstanceState) error {
84 args := m.Called(e2tAddress, currentState, newState)
88 func (m *E2TInstancesManagerMock) GetE2TAddresses() ([]string, error) {
90 return args.Get(0).([]string), args.Error(1)
93 func (m *E2TInstancesManagerMock) ClearRansOfAllE2TInstances() error {