de2a2bc443ae956dfb0aa4aaa4cbb07abcbdaab9
[ric-plt/e2mgr.git] / E2Manager / mocks / ran_list_manager_mock.go
1 //
2 // Copyright 2019 AT&T Intellectual Property
3 // Copyright 2019 Nokia
4 // Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved.
5 //
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
9 //
10 //      http://www.apache.org/licenses/LICENSE-2.0
11 //
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.
17
18 //  This source code is part of the near-RT RIC (RAN Intelligent Controller)
19 //  platform project (RICP).
20
21 package mocks
22
23 import (
24         "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities"
25         "github.com/stretchr/testify/mock"
26 )
27
28 type RanListManagerMock struct {
29         mock.Mock
30 }
31
32 // TODO: remove after replaced with UpdateNbIdentityConnectionStatus
33 func (m *RanListManagerMock) UpdateRanState(nodebInfo *entities.NodebInfo) error {
34
35         args := m.Called(nodebInfo)
36         return args.Error(0)
37 }
38
39 func (m *RanListManagerMock) InitNbIdentityMap() error {
40         args := m.Called()
41         return args.Error(0)
42 }
43
44 func (m *RanListManagerMock) AddNbIdentity(nodeType entities.Node_Type, nbIdentity *entities.NbIdentity) error {
45         args := m.Called(nodeType, nbIdentity)
46         return args.Error(0)
47 }
48
49 func (m *RanListManagerMock) UpdateNbIdentityConnectionStatus(nodeType entities.Node_Type, ranName string, connectionStatus entities.ConnectionStatus) error {
50         args := m.Called(nodeType, ranName, connectionStatus)
51         return args.Error(0)
52 }
53
54 func (m *RanListManagerMock) RemoveNbIdentity(nodeType entities.Node_Type, ranName string) error {
55         args := m.Called(nodeType, ranName)
56         return args.Error(0)
57 }
58
59 func (m *RanListManagerMock) GetNbIdentityList() []*entities.NbIdentity {
60         args := m.Called()
61         return args.Get(0).([]*entities.NbIdentity)
62 }
63
64 func (m *RanListManagerMock) UpdateHealthcheckTimeStampSent(oldRRanName string) (*entities.NbIdentity, *entities.NbIdentity){
65         args := m.Called(oldRRanName)
66         return args.Get(0).(*entities.NbIdentity), args.Get(1).(*entities.NbIdentity)
67 }
68
69 func (m *RanListManagerMock) UpdateHealthcheckTimeStampReceived(oldRRanName string) (*entities.NbIdentity, *entities.NbIdentity){
70         args := m.Called(oldRRanName)
71         return args.Get(0).(*entities.NbIdentity), args.Get(1).(*entities.NbIdentity)
72 }
73
74 func (m *RanListManagerMock) UpdateNbIdentities(nodeType entities.Node_Type, oldNbIdentities []*entities.NbIdentity, newNbIdentities []*entities.NbIdentity) error{
75         args:= m.Called(nodeType, oldNbIdentities, newNbIdentities)
76         return args.Error(0)
77 }
78