package satel import ( "github.com/stretchr/testify/assert" "testing" ) func TestMakeNameEvent(t *testing.T) { assert := assert.New(t) assert.Equal(NameEvent{ DevType: DeviceType(1), DevNumber: 2, DevTypeFunction: 3, DevName: "0123456789ABCDEF", }, makeNameEvent([]byte{01, 02, 03, '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 0xFF})) }