Foundgine uses tests to protect architectural boundaries as well as individual APIs.
dotnet test
Build first when diagnosing compilation failures:
dotnet build
dotnet test
The repository contains tests for the major packages, including:
Abstractions
AOT / generator
Semantics
Metadata
Planning
Execution
SQL
InMemory
GraphQL
MCP
AI
Security.Authority
E2E
Exact test project names are visible under src/csharp/tests/.
Test:
Test:
Test:
Test that a provider:
Security tests should assume transports are hostile.
Important cases include:
caller requests denied field
caller traverses denied relationship
caller tries to cross tenant boundary
caller supplies forged authority context
provider drops authorization predicate
cached plan loses runtime context
mutation executes without required approval/security proof
The expected result is rejection, not widened access.
PostgreSQL integration tests are separate from the database-free suite.
See POSTGRES-E2E.md.
Prefer tests that assert semantic/plan contracts rather than exact SQL formatting when the SQL text is not the behavior under test.
For provider tests, exact SQL assertions are appropriate where SQL generation itself is the subject.
A strong Foundgine test generally follows:
This is more valuable than testing an internal helper in isolation when the helper’s only purpose is to support the pipeline.
When fixing a bug:
Do not fix a semantic bug inside a transport adapter merely because that is where the failure was first observed.
Next: Current status