feat: build vehicle data platform and production pipeline
This commit is contained in:
@@ -38,6 +38,20 @@ func TestFrameFactoryGeneratesUniqueParsableJT808Frames(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestFrameFactoryUsesConfiguredJT808PhoneBase(t *testing.T) {
|
||||
factory, err := NewFrameFactoryWithJT808PhoneBase(ProtocolJT808, "0200", 138900000000)
|
||||
if err != nil {
|
||||
t.Fatalf("NewFrameFactoryWithJT808PhoneBase() error = %v", err)
|
||||
}
|
||||
frame, err := factory.Frame(42, 0)
|
||||
if err != nil {
|
||||
t.Fatalf("Frame() error = %v", err)
|
||||
}
|
||||
if got := parseJT808Frame(t, frame).Phone; got != "138900000042" {
|
||||
t.Fatalf("phone = %q, want 138900000042", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestFrameFactoryGeneratesUniqueParsableGB32960Frames(t *testing.T) {
|
||||
factory, err := NewFrameFactory(ProtocolGB32960, "realtime")
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user