Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
package nucleus
import (
"github.com/google/uuid"
"reflect"
"testing"
)
func TestNewPND(t *testing.T) {
type args struct {
name string
sbi SouthboundInterface
}
tests := []struct {
name string
args args
want PrincipalNetworkDomain
}{
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := NewPND(tt.args.name, tt.args.sbi); !reflect.DeepEqual(got, tt.want) {
t.Errorf("NewPND() = %v, want %v", got, tt.want)
}
})
}
}
func Test_addSbi(t *testing.T) {
tests := []struct {
name string
wantErr bool
}{
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if err := addSbi(); (err != nil) != tt.wantErr {
t.Errorf("addSbi() error = %v, wantErr %v", err, tt.wantErr)
}
})
}
}
func Test_destroy(t *testing.T) {
tests := []struct {
name string
wantErr bool
}{
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if err := destroy(); (err != nil) != tt.wantErr {
t.Errorf("destroy() error = %v, wantErr %v", err, tt.wantErr)
}
})
}
}
func Test_pndImplementation_AddDevice(t *testing.T) {
type fields struct {
name string
sbi map[string]SouthboundInterface
devices map[uuid.UUID]Device
}
type args struct {
device Device
}
tests := []struct {
name string
fields fields
args args
wantErr bool
}{
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
pnd := &pndImplementation{
Name: tt.fields.name,
Sbi: tt.fields.sbi,
Devices: tt.fields.devices,
}
if err := pnd.AddDevice(tt.args.device); (err != nil) != tt.wantErr {
t.Errorf("AddDevice() error = %v, wantErr %v", err, tt.wantErr)
}
})
}
}
func Test_pndImplementation_AddSbi(t *testing.T) {
type fields struct {
name string
sbi map[string]SouthboundInterface
devices map[uuid.UUID]Device
}
tests := []struct {
name string
fields fields
wantErr bool
}{
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
pnd := &pndImplementation{
Name: tt.fields.name,
Sbi: tt.fields.sbi,
Devices: tt.fields.devices,
}
if err := pnd.AddSbi(); (err != nil) != tt.wantErr {
t.Errorf("AddSbi() error = %v, wantErr %v", err, tt.wantErr)
}
})
}
}
func Test_pndImplementation_Destroy(t *testing.T) {
type fields struct {
name string
sbi map[string]SouthboundInterface
devices map[uuid.UUID]Device
}
tests := []struct {
name string
fields fields
wantErr bool
}{
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
pnd := &pndImplementation{
Name: tt.fields.name,
Sbi: tt.fields.sbi,
Devices: tt.fields.devices,
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
}
if err := pnd.Destroy(); (err != nil) != tt.wantErr {
t.Errorf("Destroy() error = %v, wantErr %v", err, tt.wantErr)
}
})
}
}
func Test_pndImplementation_RemoveDevice(t *testing.T) {
type fields struct {
name string
sbi map[string]SouthboundInterface
devices map[uuid.UUID]Device
}
type args struct {
uuid uuid.UUID
}
tests := []struct {
name string
fields fields
args args
wantErr bool
}{
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
pnd := &pndImplementation{
Name: tt.fields.name,
Sbi: tt.fields.sbi,
Devices: tt.fields.devices,
}
if err := pnd.RemoveDevice(tt.args.uuid); (err != nil) != tt.wantErr {
t.Errorf("RemoveDevice() error = %v, wantErr %v", err, tt.wantErr)
}
})
}
}
func Test_pndImplementation_RemoveSbi(t *testing.T) {
type fields struct {
name string
sbi map[string]SouthboundInterface
devices map[uuid.UUID]Device
}
tests := []struct {
name string
fields fields
wantErr bool
}{
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
pnd := &pndImplementation{
Name: tt.fields.name,
Sbi: tt.fields.sbi,
Devices: tt.fields.devices,
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
}
if err := pnd.RemoveSbi(); (err != nil) != tt.wantErr {
t.Errorf("RemoveSbi() error = %v, wantErr %v", err, tt.wantErr)
}
})
}
}
func Test_pndImplementation_addDevice(t *testing.T) {
type fields struct {
name string
sbi map[string]SouthboundInterface
devices map[uuid.UUID]Device
}
type args struct {
device Device
}
tests := []struct {
name string
fields fields
args args
wantErr bool
}{
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
pnd := &pndImplementation{
Name: tt.fields.name,
Sbi: tt.fields.sbi,
Devices: tt.fields.devices,
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
}
if err := pnd.addDevice(tt.args.device); (err != nil) != tt.wantErr {
t.Errorf("addDevice() error = %v, wantErr %v", err, tt.wantErr)
}
})
}
}
func Test_pndImplementation_removeDevice(t *testing.T) {
type fields struct {
name string
sbi map[string]SouthboundInterface
devices map[uuid.UUID]Device
}
type args struct {
uuid uuid.UUID
}
tests := []struct {
name string
fields fields
args args
wantErr bool
}{
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
pnd := &pndImplementation{
Name: tt.fields.name,
Sbi: tt.fields.sbi,
Devices: tt.fields.devices,
}
if err := pnd.removeDevice(tt.args.uuid); (err != nil) != tt.wantErr {
t.Errorf("removeDevice() error = %v, wantErr %v", err, tt.wantErr)
}
})
}
}
func Test_removeSbi(t *testing.T) {
tests := []struct {
name string
wantErr bool
}{
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if err := removeSbi(); (err != nil) != tt.wantErr {
t.Errorf("removeSbi() error = %v, wantErr %v", err, tt.wantErr)
}
})
}
}