Enhance documentation for API client and vehicle structures; improve test function naming for clarity
All checks were successful
Golan Testing / testing (1.24.x, ubuntu-latest) (push) Successful in 24s

This commit is contained in:
2025-07-06 15:15:12 -04:00
parent d8cf2c3fd7
commit 3c927fd83b
7 changed files with 61 additions and 64 deletions

View File

@ -6,6 +6,7 @@ import (
"testing"
)
// TestGetClimateQuickPresets_Success tests the retrieval of quick climate presets.
func TestGetClimatePresets_Success(t *testing.T) {
handler := func(w http.ResponseWriter, r *http.Request) {
// Handle API_LOGIN endpoint
@ -32,7 +33,7 @@ func TestGetClimatePresets_Success(t *testing.T) {
ts.Start()
defer ts.Close()
cfg := makeConfig(t)
cfg := mockConfig(t)
msc, err := New(cfg)
if err != nil {
@ -49,6 +50,7 @@ func TestGetClimatePresets_Success(t *testing.T) {
}
}
// TestGetClimateQuickPresets_Success tests the retrieval of quick climate presets.
func TestGetClimateQuickPresets_Success(t *testing.T) {
handler := func(w http.ResponseWriter, r *http.Request) {
// Handle API_LOGIN endpoint
@ -75,7 +77,7 @@ func TestGetClimateQuickPresets_Success(t *testing.T) {
ts.Start()
defer ts.Close()
cfg := makeConfig(t)
cfg := mockConfig(t)
msc, err := New(cfg)
if err != nil {
@ -92,6 +94,7 @@ func TestGetClimateQuickPresets_Success(t *testing.T) {
}
}
// TestGetClimateUserPresets_Success tests the retrieval of user-defined climate presets.
func TestGetClimateUserPresets_Success(t *testing.T) {
handler := func(w http.ResponseWriter, r *http.Request) {
// Handle API_LOGIN endpoint
@ -118,7 +121,7 @@ func TestGetClimateUserPresets_Success(t *testing.T) {
ts.Start()
defer ts.Close()
cfg := makeConfig(t)
cfg := mockConfig(t)
msc, err := New(cfg)
if err != nil {
@ -135,6 +138,7 @@ func TestGetClimateUserPresets_Success(t *testing.T) {
}
}
// TestGetVehicleCondition_Success tests the GetVehicleCondition method
func TestGetVehicleStatus_Success(t *testing.T) {
handler := func(w http.ResponseWriter, r *http.Request) {
// Handle API_LOGIN endpoint
@ -161,7 +165,7 @@ func TestGetVehicleStatus_Success(t *testing.T) {
ts.Start()
defer ts.Close()
cfg := makeConfig(t)
cfg := mockConfig(t)
msc, err := New(cfg)
if err != nil {
@ -178,6 +182,7 @@ func TestGetVehicleStatus_Success(t *testing.T) {
}
}
// TestGetVehicleCondition_Success tests the GetVehicleCondition method
func TestGetVehicleCondition_Success(t *testing.T) {
handler := func(w http.ResponseWriter, r *http.Request) {
// Handle API_LOGIN endpoint
@ -204,7 +209,7 @@ func TestGetVehicleCondition_Success(t *testing.T) {
ts.Start()
defer ts.Close()
cfg := makeConfig(t)
cfg := mockConfig(t)
msc, err := New(cfg)
if err != nil {
@ -221,6 +226,7 @@ func TestGetVehicleCondition_Success(t *testing.T) {
}
}
// TestGetVehicleHealth_Success tests the successful retrieval of vehicle health data.
func TestGetVehicleHealth_Success(t *testing.T) {
handler := func(w http.ResponseWriter, r *http.Request) {
// Handle API_LOGIN endpoint
@ -247,7 +253,7 @@ func TestGetVehicleHealth_Success(t *testing.T) {
ts.Start()
defer ts.Close()
cfg := makeConfig(t)
cfg := mockConfig(t)
msc, err := New(cfg)
if err != nil {