-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdatalist_test.go
56 lines (52 loc) · 1.15 KB
/
datalist_test.go
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
/*
Copyright © 2019 M.Watermann, 10247 Berlin, Germany
All rights reserved
EMail : <[email protected]>
*/
package kaliber
import (
"reflect"
"testing"
)
func TestNewDataList(t *testing.T) {
d1 := &TemplateData{}
tests := []struct {
name string
want *TemplateData
}{
// TODO: Add test cases.
{" 1", d1},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := NewTemplateData(); !reflect.DeepEqual(got, tt.want) {
t.Errorf("NewDataList() = %v,\nwant %v", got, tt.want)
}
})
}
} // TestNewDataList()
func TestTDataList_Set(t *testing.T) {
d1 := NewTemplateData()
w1 := NewTemplateData()
(*w1)["Title"] = "Testing"
type args struct {
aKey string
aValue interface{}
}
tests := []struct {
name string
d *TemplateData
args args
want *TemplateData
}{
// TODO: Add test cases.
{" 1", d1, args{"Title", "Testing"}, w1},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := tt.d.Set(tt.args.aKey, tt.args.aValue); !reflect.DeepEqual(got, tt.want) {
t.Errorf("TDataList.Add() = %v, want\n%v", got, tt.want)
}
})
}
} // TestTDataList_Set()