2 // Copyright 2019 AT&T Intellectual Property
3 // Copyright 2019 Nokia
4 // Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved.
6 // Licensed under the Apache License, Version 2.0 (the "License");
7 // you may not use this file except in compliance with the License.
8 // You may obtain a copy of the License at
10 // http://www.apache.org/licenses/LICENSE-2.0
12 // Unless required by applicable law or agreed to in writing, software
13 // distributed under the License is distributed on an "AS IS" BASIS,
14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 // See the License for the specific language governing permissions and
16 // 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 RanListManagerMock struct {
32 // TODO: remove after replaced with UpdateNbIdentityConnectionStatus
33 func (m *RanListManagerMock) UpdateRanState(nodebInfo *entities.NodebInfo) error {
35 args := m.Called(nodebInfo)
39 func (m *RanListManagerMock) InitNbIdentityMap() error {
44 func (m *RanListManagerMock) AddNbIdentity(nodeType entities.Node_Type, nbIdentity *entities.NbIdentity) error {
45 args := m.Called(nodeType, nbIdentity)
49 func (m *RanListManagerMock) UpdateNbIdentityConnectionStatus(nodeType entities.Node_Type, ranName string, connectionStatus entities.ConnectionStatus) error {
50 args := m.Called(nodeType, ranName, connectionStatus)
54 func (m *RanListManagerMock) RemoveNbIdentity(nodeType entities.Node_Type, ranName string) error {
55 args := m.Called(nodeType, ranName)
59 func (m *RanListManagerMock) GetNbIdentityList() []*entities.NbIdentity {
61 return args.Get(0).([]*entities.NbIdentity)
64 func (m *RanListManagerMock) GetNbIdentity(ranName string) (*entities.NbIdentity, error) {
65 args := m.Called(ranName)
66 return args.Get(0).(*entities.NbIdentity), args.Error(1)
69 func (m *RanListManagerMock) UpdateHealthcheckTimeStampSent(oldRRanName string) (*entities.NbIdentity, *entities.NbIdentity){
70 args := m.Called(oldRRanName)
71 return args.Get(0).(*entities.NbIdentity), args.Get(1).(*entities.NbIdentity)
74 func (m *RanListManagerMock) UpdateHealthcheckTimeStampReceived(oldRRanName string) (*entities.NbIdentity, *entities.NbIdentity){
75 args := m.Called(oldRRanName)
76 return args.Get(0).(*entities.NbIdentity), args.Get(1).(*entities.NbIdentity)
79 func (m *RanListManagerMock) UpdateNbIdentities(nodeType entities.Node_Type, oldNbIdentities []*entities.NbIdentity, newNbIdentities []*entities.NbIdentity) error{
80 args:= m.Called(nodeType, oldNbIdentities, newNbIdentities)