Files
dance-lessons-coach/pkg/greet/greet_v2_test.go
Gabriel Radureau 9336178d73 📝 docs: add ADR for staged-only Git hooks formatting
- Add ADR-0012 documenting the decision to format only staged Go files
- Update ADR README.md with new entry
- Document rationale, alternatives, and verification results
- Include future considerations for monitoring and CI/CD integration

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-04-04 21:36:57 +02:00

29 lines
599 B
Go

package greet
import (
"context"
"testing"
)
func TestServiceV2_GreetV2(t *testing.T) {
service := NewServiceV2()
tests := []struct {
name string
expected string
}{
{"", "Hello my friend!"},
{"John", "Hello my friend John!"},
{"Alice", "Hello my friend Alice!"},
{" ", "Hello my friend !"}, // spaces are not considered empty
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
result := service.GreetV2(context.Background(), tt.name)
if result != tt.expected {
t.Errorf("GreetV2(%q) = %q, want %q", tt.name, result, tt.expected)
}
})
}
}