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.
20 "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities"
21 "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/common"
22 "github.com/stretchr/testify/mock"
25 type RnibReaderMock struct {
29 func (m *RnibReaderMock) GetNodeb(inventoryName string) (*entities.NodebInfo, common.IRNibError) {
30 args := m.Called(inventoryName)
33 errArg := args.Get(1);
36 return args.Get(0).(*entities.NodebInfo), errArg.(common.IRNibError);
39 return args.Get(0).(*entities.NodebInfo), nil
42 func (m *RnibReaderMock) GetNodebByGlobalNbId(nodeType entities.Node_Type, globalNbId *entities.GlobalNbId) (*entities.NodebInfo, common.IRNibError) {
43 args := m.Called(nodeType, globalNbId)
45 errArg := args.Get(1);
48 return args.Get(0).(*entities.NodebInfo), errArg.(common.IRNibError);
51 return args.Get(0).(*entities.NodebInfo), nil
54 func (m *RnibReaderMock) GetCellList(inventoryName string) (*entities.Cells, common.IRNibError) {
55 args := m.Called(inventoryName)
57 errArg := args.Get(1);
60 return args.Get(0).(*entities.Cells), errArg.(common.IRNibError);
63 return args.Get(0).(*entities.Cells), nil
66 func (m *RnibReaderMock) GetListGnbIds()(*[]*entities.NbIdentity, common.IRNibError) {
69 errArg := args.Get(1);
72 return args.Get(0).(*[]*entities.NbIdentity), errArg.(common.IRNibError);
75 return args.Get(0).(*[]*entities.NbIdentity), nil
78 func (m *RnibReaderMock) GetListEnbIds()(*[]*entities.NbIdentity, common.IRNibError) {
81 errArg := args.Get(1);
84 return args.Get(0).(*[]*entities.NbIdentity), errArg.(common.IRNibError);
87 return args.Get(0).(*[]*entities.NbIdentity), nil
91 func (m *RnibReaderMock) GetCountGnbList()(int, common.IRNibError) {
94 errArg := args.Get(1);
97 return args.Int(0), errArg.(common.IRNibError);
100 return args.Int(0), nil
104 func (m *RnibReaderMock) GetCell(inventoryName string, pci uint32) (*entities.Cell, common.IRNibError) {
105 args := m.Called(inventoryName, pci)
107 errArg := args.Get(1);
110 return args.Get(0).(*entities.Cell), errArg.(common.IRNibError);
113 return args.Get(0).(*entities.Cell), nil
116 func (m *RnibReaderMock) GetCellById(cellType entities.Cell_Type, cellId string) (*entities.Cell, common.IRNibError) {
117 args := m.Called(cellType, cellId)
119 errArg := args.Get(1);
122 return args.Get(0).(*entities.Cell), errArg.(common.IRNibError);
125 return args.Get(0).(*entities.Cell), nil
128 func (m *RnibReaderMock) GetListNodebIds()([]*entities.NbIdentity, common.IRNibError){
131 errArg := args.Get(1)
134 return args.Get(0).([]*entities.NbIdentity), errArg.(common.IRNibError)
137 return args.Get(0).([]*entities.NbIdentity), nil
140 func (m *RnibReaderMock) GetRanLoadInformation(inventoryName string) (*entities.RanLoadInformation, common.IRNibError){
143 errArg := args.Get(1)
146 return args.Get(0).(*entities.RanLoadInformation), errArg.(common.IRNibError)
149 return args.Get(0).(*entities.RanLoadInformation), nil