1
0
Fork 0
go-satel/get_name_test.go

17 lines
409 B
Go
Raw Normal View History

2024-03-03 21:42:13 +00:00
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}))
}