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/common"
21 "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities"
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)
32 errArg := args.Get(1);
35 return args.Get(0).(*entities.NodebInfo), errArg.(common.IRNibError);
38 return args.Get(0).(*entities.NodebInfo), nil
41 func (m *RnibReaderMock) GetNodebByGlobalNbId(nodeType entities.Node_Type, globalNbId *entities.GlobalNbId) (*entities.NodebInfo, common.IRNibError) {
42 args := m.Called(nodeType, globalNbId)
44 errArg := args.Get(1);
47 return args.Get(0).(*entities.NodebInfo), errArg.(common.IRNibError);
50 return args.Get(0).(*entities.NodebInfo), nil
53 func (m *RnibReaderMock) GetCellList(inventoryName string) (*entities.Cells, common.IRNibError) {
54 args := m.Called(inventoryName)
56 errArg := args.Get(1);
59 return args.Get(0).(*entities.Cells), errArg.(common.IRNibError);
62 return args.Get(0).(*entities.Cells), nil
65 func (m *RnibReaderMock) GetListGnbIds() (*[]*entities.NbIdentity, common.IRNibError) {
68 errArg := args.Get(1);
71 return args.Get(0).(*[]*entities.NbIdentity), errArg.(common.IRNibError);
74 return args.Get(0).(*[]*entities.NbIdentity), nil
77 func (m *RnibReaderMock) GetListEnbIds() (*[]*entities.NbIdentity, common.IRNibError) {
80 errArg := args.Get(1);
83 return args.Get(0).(*[]*entities.NbIdentity), errArg.(common.IRNibError);
86 return args.Get(0).(*[]*entities.NbIdentity), nil
90 func (m *RnibReaderMock) GetCountGnbList() (int, common.IRNibError) {
93 errArg := args.Get(1);
96 return args.Int(0), errArg.(common.IRNibError);
99 return args.Int(0), nil
103 func (m *RnibReaderMock) GetCell(inventoryName string, pci uint32) (*entities.Cell, common.IRNibError) {
104 args := m.Called(inventoryName, pci)
106 errArg := args.Get(1);
109 return args.Get(0).(*entities.Cell), errArg.(common.IRNibError);
112 return args.Get(0).(*entities.Cell), nil
115 func (m *RnibReaderMock) GetCellById(cellType entities.Cell_Type, cellId string) (*entities.Cell, common.IRNibError) {
116 args := m.Called(cellType, cellId)
118 errArg := args.Get(1);
121 return args.Get(0).(*entities.Cell), errArg.(common.IRNibError);
124 return args.Get(0).(*entities.Cell), nil
127 func (m *RnibReaderMock) GetListNodebIds() ([]*entities.NbIdentity, common.IRNibError) {
130 errArg := args.Get(1)
133 return args.Get(0).([]*entities.NbIdentity), errArg.(common.IRNibError)
136 return args.Get(0).([]*entities.NbIdentity), nil
139 func (m *RnibReaderMock) GetRanLoadInformation(inventoryName string) (*entities.RanLoadInformation, common.IRNibError) {
142 errArg := args.Get(1)
145 return args.Get(0).(*entities.RanLoadInformation), errArg.(common.IRNibError)
148 return args.Get(0).(*entities.RanLoadInformation), nil