evcc-io/util/param_test.go
2025-01-23 16:16:21 +01:00

23 lines
341 B
Go

package util
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestParam(t *testing.T) {
lp := 2
p := Param{
Key: "power",
Val: 4711,
}
assert.Equal(t, "power", p.UniqueID())
p.Loadpoint = &lp
assert.Equal(t, "2.power", p.UniqueID())
}
func TestParamCache(t *testing.T) {
NewParamCache().Add("foo", Param{})
}