RIC:1060: Change in PTL
[ric-plt/nodeb-rnib.git] / reader / sdlInstanceMock.go
1 //
2 // Copyright 2019 AT&T Intellectual Property
3 // Copyright 2019 Nokia
4 //
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
8 //
9 //      http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16
17 //  This source code is part of the near-RT RIC (RAN Intelligent Controller)
18 //  platform project (RICP).
19
20 package reader
21
22 import "github.com/stretchr/testify/mock"
23
24 //Deprecated: Will be removed in a future release, please use MockSdlSyncStorage instead.
25 type MockSdlInstance struct {
26         mock.Mock
27 }
28
29 //Deprecated: Will be removed in a future release, please use instead the SubscribeChannel
30 //receiver function of the MockSdlSyncStorage type.
31 func (m *MockSdlInstance) SubscribeChannel(cb func(string, ...string), channels ...string) error {
32         a := m.Called(cb, channels)
33         return a.Error(0)
34 }
35
36 //Deprecated: Will be removed in a future release, please use instead the UnsubscribeChannel
37 //receiver function of the MockSdlSyncStorage type.
38 func (m *MockSdlInstance) UnsubscribeChannel(channels ...string) error {
39         a := m.Called(channels)
40         return a.Error(0)
41 }
42
43 //Deprecated: Will be removed in a future release, please use instead the SetAndPublish
44 //receiver function of the MockSdlSyncStorage type.
45 func (m *MockSdlInstance) SetAndPublish(channelsAndEvents []string, pairs ...interface{}) error {
46         a := m.Called(channelsAndEvents, pairs)
47         return a.Error(0)
48 }
49
50 //Deprecated: Will be removed in a future release, please use instead the SetIfAndPublish
51 //receiver function of the MockSdlSyncStorage type.
52 func (m *MockSdlInstance) SetIfAndPublish(channelsAndEvents []string, key string, oldData, newData interface{}) (bool, error) {
53         a := m.Called(channelsAndEvents, key, oldData, newData)
54         return a.Bool(0), a.Error(1)
55 }
56
57 //Deprecated: Will be removed in a future release, please use instead the SetIfNotExistsAndPublish
58 //receiver function of the MockSdlSyncStorage type.
59 func (m *MockSdlInstance) SetIfNotExistsAndPublish(channelsAndEvents []string, key string, data interface{}) (bool, error) {
60         a := m.Called(channelsAndEvents, key, data)
61         return a.Bool(0), a.Error(1)
62 }
63
64 //Deprecated: Will be removed in a future release, please use instead the RemoveAndPublish
65 //receiver function of the MockSdlSyncStorage type.
66 func (m *MockSdlInstance) RemoveAndPublish(channelsAndEvents []string, keys []string) error {
67         a := m.Called(channelsAndEvents, keys)
68         return a.Error(0)
69 }
70
71 //Deprecated: Will be removed in a future release, please use instead the RemoveIfAndPublish
72 //receiver function of the MockSdlSyncStorage type.
73 func (m *MockSdlInstance) RemoveIfAndPublish(channelsAndEvents []string, key string, data interface{}) (bool, error) {
74         a := m.Called(channelsAndEvents, key, data)
75         return a.Bool(0), a.Error(1)
76 }
77
78 //Deprecated: Will be removed in a future release, please use instead the RemoveAllAndPublish
79 //receiver function of the MockSdlSyncStorage type.
80 func (m *MockSdlInstance) RemoveAllAndPublish(channelsAndEvents []string) error {
81         a := m.Called(channelsAndEvents)
82         return a.Error(0)
83 }
84
85 //Deprecated: Will be removed in a future release, please use instead the Set
86 //receiver function of the MockSdlSyncStorage type.
87 func (m *MockSdlInstance) Set(pairs ...interface{}) error {
88         a := m.Called(pairs)
89         return a.Error(0)
90 }
91
92 //Deprecated: Will be removed in a future release, please use instead the Get
93 //receiver function of the MockSdlSyncStorage type.
94 func (m *MockSdlInstance) Get(keys []string) (map[string]interface{}, error) {
95         a := m.Called(keys)
96         return a.Get(0).(map[string]interface{}), a.Error(1)
97 }
98
99 //Deprecated: Will be removed in a future release, please use instead the GetAll
100 //receiver function of the MockSdlSyncStorage type.
101 func (m *MockSdlInstance) GetAll() ([]string, error) {
102         a := m.Called()
103         return a.Get(0).([]string), a.Error(1)
104 }
105
106 //Deprecated: Will be removed in a future release, please use instead the Close
107 //receiver function of the MockSdlSyncStorage type.
108 func (m *MockSdlInstance) Close() error {
109         a := m.Called()
110         return a.Error(0)
111 }
112
113 //Deprecated: Will be removed in a future release, please use instead the Remove
114 //receiver function of the MockSdlSyncStorage type.
115 func (m *MockSdlInstance) Remove(keys []string) error {
116         a := m.Called(keys)
117         return a.Error(0)
118 }
119
120 //Deprecated: Will be removed in a future release, please use instead the RemoveAll
121 //receiver function of the MockSdlSyncStorage type.
122 func (m *MockSdlInstance) RemoveAll() error {
123         a := m.Called()
124         return a.Error(0)
125 }
126
127 //Deprecated: Will be removed in a future release, please use instead the SetIf
128 //receiver function of the MockSdlSyncStorage type.
129 func (m *MockSdlInstance) SetIf(key string, oldData, newData interface{}) (bool, error) {
130         a := m.Called(key, oldData, newData)
131         return a.Bool(0), a.Error(1)
132 }
133
134 //Deprecated: Will be removed in a future release, please use instead the SetIfNotExists
135 //receiver function of the MockSdlSyncStorage type.
136 func (m *MockSdlInstance) SetIfNotExists(key string, data interface{}) (bool, error) {
137         a := m.Called(key, data)
138         return a.Bool(0), a.Error(1)
139 }
140
141 //Deprecated: Will be removed in a future release, please use instead the RemoveIf
142 //receiver function of the MockSdlSyncStorage type.
143 func (m *MockSdlInstance) RemoveIf(key string, data interface{}) (bool, error) {
144         a := m.Called(key, data)
145         return a.Bool(0), a.Error(1)
146 }
147
148 //Deprecated: Will be removed in a future release, please use instead the AddMember
149 //receiver function of the MockSdlSyncStorage type.
150 func (m *MockSdlInstance) AddMember(group string, member ...interface{}) error {
151         a := m.Called(group, member)
152         return a.Error(0)
153 }
154
155 //Deprecated: Will be removed in a future release, please use instead the RemoveMember
156 //receiver function of the MockSdlSyncStorage type.
157 func (m *MockSdlInstance) RemoveMember(group string, member ...interface{}) error {
158         a := m.Called(group, member)
159         return a.Error(0)
160 }
161
162 //Deprecated: Will be removed in a future release, please use instead the RemoveGroup
163 //receiver function of the MockSdlSyncStorage type.
164 func (m *MockSdlInstance) RemoveGroup(group string) error {
165         a := m.Called(group)
166         return a.Error(0)
167 }
168
169 //Deprecated: Will be removed in a future release, please use instead the GetMembers
170 //receiver function of the MockSdlSyncStorage type.
171 func (m *MockSdlInstance) GetMembers(group string) ([]string, error) {
172         a := m.Called(group)
173         return a.Get(0).([]string), a.Error(1)
174 }
175
176 //Deprecated: Will be removed in a future release, please use instead the IsMember
177 //receiver function of the MockSdlSyncStorage type.
178 func (m *MockSdlInstance) IsMember(group string, member interface{}) (bool, error) {
179         a := m.Called(group, member)
180         return a.Bool(0), a.Error(1)
181 }
182
183 //Deprecated: Will be removed in a future release, please use instead the GroupSize
184 //receiver function of the MockSdlSyncStorage type.
185 func (m *MockSdlInstance) GroupSize(group string) (int64, error) {
186         a := m.Called(group, )
187         return int64(a.Int(0)), a.Error(1)
188 }