-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpropertiescache_test.go
More file actions
42 lines (32 loc) · 978 Bytes
/
propertiescache_test.go
File metadata and controls
42 lines (32 loc) · 978 Bytes
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
package cuirass_test
import (
"testing"
"github.com/arjantop/cuirass"
"github.com/arjantop/vaquita"
"github.com/stretchr/testify/assert"
)
func TestGetPropertiesCached(t *testing.T) {
cfg := vaquita.NewEmptyMapConfig()
p1 := cuirass.GetProperties(cfg, "n", "g")
p2 := cuirass.GetProperties(cfg, "n", "g")
assert.True(t, p1 == p2)
}
func TestGetPropertiesName(t *testing.T) {
cfg := vaquita.NewEmptyMapConfig()
p1 := cuirass.GetProperties(cfg, "n", "g")
p2 := cuirass.GetProperties(cfg, "n2", "g")
assert.True(t, p1 != p2)
}
func TestGetPropertiesGroup(t *testing.T) {
cfg := vaquita.NewEmptyMapConfig()
p1 := cuirass.GetProperties(cfg, "n", "g")
p2 := cuirass.GetProperties(cfg, "n", "g2")
assert.True(t, p1 != p2)
}
func TestGetPropertiesConfig(t *testing.T) {
cfg := vaquita.NewEmptyMapConfig()
p1 := cuirass.GetProperties(cfg, "n", "g")
cfg2 := vaquita.NewEmptyMapConfig()
p2 := cuirass.GetProperties(cfg2, "n", "g")
assert.True(t, p1 != p2)
}