Skip to content

Commit

Permalink
wheel tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BK1031 committed Apr 17, 2024
1 parent 723c915 commit 2b51740
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions ingest/service/gr24/wheel_service_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package gr24service

import (
"ingest/utils"
"testing"
)

func TestParseWheel(t *testing.T) {
utils.InitializeLogger()
t.Run("Wheel Test 1", func(t *testing.T) {
// Arrange
data := make([]byte, 40)
// Act
wheel := parseWheel(data)
// Assert
if wheel.ID == "" {
t.Error("Expected wheel.ID to not be empty")
}
})
t.Run("Wheel Test 2", func(t *testing.T) {
// Arrange
data := []byte{0, 183, 0, 138, 11, 193, 2, 6, 192}
// Act
wheel := parseWheel(data)
// Assert
if wheel.ID != "" {
t.Error("Expected wheel.ID to be empty")
}
})
}

0 comments on commit 2b51740

Please sign in to comment.