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 "github.com/stretchr/testify/mock"
24 type RnibReaderMock struct {
28 func (m *RnibReaderMock) GetNodeb(inventoryName string) (*entities.NodebInfo, error) {
29 args := m.Called(inventoryName)
31 errArg := args.Get(1);
34 return args.Get(0).(*entities.NodebInfo), errArg.(error);
37 return args.Get(0).(*entities.NodebInfo), nil
40 func (m *RnibReaderMock) GetNodebByGlobalNbId(nodeType entities.Node_Type, globalNbId *entities.GlobalNbId) (*entities.NodebInfo, error) {
41 args := m.Called(nodeType, globalNbId)
43 errArg := args.Get(1);
46 return args.Get(0).(*entities.NodebInfo), errArg.(error);
49 return args.Get(0).(*entities.NodebInfo), nil
52 func (m *RnibReaderMock) GetCellList(inventoryName string) (*entities.Cells, error) {
53 args := m.Called(inventoryName)
55 errArg := args.Get(1);
58 return args.Get(0).(*entities.Cells), errArg.(error);
61 return args.Get(0).(*entities.Cells), nil
64 func (m *RnibReaderMock) GetListGnbIds() ([]*entities.NbIdentity, error) {
67 errArg := args.Get(1);
70 return args.Get(0).([]*entities.NbIdentity), errArg.(error);
73 return args.Get(0).([]*entities.NbIdentity), nil
76 func (m *RnibReaderMock) GetListEnbIds() ([]*entities.NbIdentity, error) {
79 errArg := args.Get(1);
82 return args.Get(0).([]*entities.NbIdentity), errArg.(error);
85 return args.Get(0).([]*entities.NbIdentity), nil
89 func (m *RnibReaderMock) GetCountGnbList() (int, error) {
92 errArg := args.Get(1);
95 return args.Int(0), errArg.(error);
98 return args.Int(0), nil
102 func (m *RnibReaderMock) GetCell(inventoryName string, pci uint32) (*entities.Cell, error) {
103 args := m.Called(inventoryName, pci)
105 errArg := args.Get(1);
108 return args.Get(0).(*entities.Cell), errArg.(error);
111 return args.Get(0).(*entities.Cell), nil
114 func (m *RnibReaderMock) GetCellById(cellType entities.Cell_Type, cellId string) (*entities.Cell, error) {
115 args := m.Called(cellType, cellId)
117 errArg := args.Get(1);
120 return args.Get(0).(*entities.Cell), errArg.(error);
123 return args.Get(0).(*entities.Cell), nil
126 func (m *RnibReaderMock) GetListNodebIds() ([]*entities.NbIdentity, error) {
129 errArg := args.Get(1)
132 return args.Get(0).([]*entities.NbIdentity), errArg.(error)
135 return args.Get(0).([]*entities.NbIdentity), nil
138 func (m *RnibReaderMock) GetRanLoadInformation(inventoryName string) (*entities.RanLoadInformation, error) {
141 errArg := args.Get(1)
144 return args.Get(0).(*entities.RanLoadInformation), errArg.(error)
147 return args.Get(0).(*entities.RanLoadInformation), nil
150 func (m *RnibReaderMock) GetE2TInstance(e2taddress string) (*entities.E2TInstance, error) {
151 args := m.Called(e2taddress)
152 return args.Get(0).(*entities.E2TInstance), args.Error(1)
155 func (m *RnibReaderMock) GetE2TInfoList() ([]*entities.E2TInstanceInfo, error) {
157 return args.Get(0).([]*entities.E2TInstanceInfo), args.Error(1)