Major additions: - Community Next.js app (port 18187) for browsing claims with API docs - stemedb-chaos crate: Fault injection, chaos testing, CRDT properties - Latent ingestion system: Reddit/FDA ingesters with ADK-Go agents - Disputed claims handling: Manual review workflows and validation - Aphoria security scanner: New extractors (SQL injection, command injection, weak crypto, TLS version), policy-based ignores, UAT reports - Docker infrastructure: Dockerfile, docker-compose.yml for full stack - VulnBank demo: Intentionally vulnerable multi-language test corpus SDK & API enhancements: - Source registry handlers for tracking data provenance - Metrics endpoint - Skeptic filtering improvements Code quality: - Split 14 large files (>500 lines) into focused modules - All files now under 500-line limit per project guidelines Documentation: - Chaos testing guide, circuit breakers, observability docs - Phase 7 UAT documentation updates - Martin Kleppmann technical writer agent Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
53 lines
1.0 KiB
Go
53 lines
1.0 KiB
Go
package steme
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
// TestObjectValueConstructors tests the object value constructor functions.
|
|
func TestObjectValueConstructors(t *testing.T) {
|
|
tests := []struct {
|
|
name string
|
|
value ObjectValue
|
|
wantType string
|
|
wantValue any
|
|
}{
|
|
{
|
|
name: "text value",
|
|
value: NewTextValue("hello"),
|
|
wantType: "Text",
|
|
wantValue: "hello",
|
|
},
|
|
{
|
|
name: "number value",
|
|
value: NewNumberValue(42.5),
|
|
wantType: "Number",
|
|
wantValue: 42.5,
|
|
},
|
|
{
|
|
name: "boolean value",
|
|
value: NewBooleanValue(true),
|
|
wantType: "Boolean",
|
|
wantValue: true,
|
|
},
|
|
{
|
|
name: "reference value",
|
|
value: NewReferenceValue("Entity_Id"),
|
|
wantType: "Reference",
|
|
wantValue: "Entity_Id",
|
|
},
|
|
}
|
|
|
|
for _, tt := range tests {
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
if tt.value.Type != tt.wantType {
|
|
t.Errorf("Type = %s, want %s", tt.value.Type, tt.wantType)
|
|
}
|
|
|
|
if tt.value.Value != tt.wantValue {
|
|
t.Errorf("Value = %v, want %v", tt.value.Value, tt.wantValue)
|
|
}
|
|
})
|
|
}
|
|
}
|