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>
40 lines
938 B
Go
40 lines
938 B
Go
package steme
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
// TestQueryBuilder tests the fluent query builder API.
|
|
func TestQueryBuilder(t *testing.T) {
|
|
lens := LensConsensus
|
|
lifecycle := LifecycleApproved
|
|
|
|
params := NewQuery().
|
|
WithSubject("Tesla_Inc").
|
|
WithPredicate("has_revenue").
|
|
WithLens(lens).
|
|
WithLifecycle(lifecycle).
|
|
WithLimit(10).
|
|
Build()
|
|
|
|
if params.Subject == nil || *params.Subject != "Tesla_Inc" {
|
|
t.Errorf("Subject = %v, want Tesla_Inc", params.Subject)
|
|
}
|
|
|
|
if params.Predicate == nil || *params.Predicate != "has_revenue" {
|
|
t.Errorf("Predicate = %v, want has_revenue", params.Predicate)
|
|
}
|
|
|
|
if params.Lens == nil || *params.Lens != LensConsensus {
|
|
t.Errorf("Lens = %v, want Consensus", params.Lens)
|
|
}
|
|
|
|
if params.Lifecycle == nil || *params.Lifecycle != LifecycleApproved {
|
|
t.Errorf("Lifecycle = %v, want Approved", params.Lifecycle)
|
|
}
|
|
|
|
if params.Limit != 10 {
|
|
t.Errorf("Limit = %d, want 10", params.Limit)
|
|
}
|
|
}
|