Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ so moving a project cannot silently retarget a test.
- `test/CodoMetis.ValueRanges.NodaTime.Tests/` — NodaTime satellite unit tests
- `test/CodoMetis.ValueRanges.EFCore.PostgreSQL.Tests/` — EF Core SQL translation tests (no database)
- `test/CodoMetis.ValueRanges.EFCore.PostgreSQL.NodaTime.Tests/` — NodaTime EF translation tests (no database)
- `test/CodoMetis.ValueRanges.EFCore.PostgreSQL.IntegrationTests/` — Live PostgreSQL via Testcontainers (needs Docker; Inconclusive without, but hard failure under CI=true). Covers BCL and NodaTime types. Authority on PostgreSQL semantics — run when changing translations or range algebra
- `test/CodoMetis.ValueRanges.EFCore.PostgreSQL.IntegrationTests/` — Live PostgreSQL via Testcontainers (needs Docker; Inconclusive without, but hard failure under CI=true). Covers BCL and NodaTime types. Authority on PostgreSQL semantics — run when changing translations or range algebra. `CapturedCollectionProbeTests` sends every discovered range and set type as a captured collection (`Contains`, `Any`, `Count`); it links `RangeProbes` and `SetProbes` from the conventions project rather than copying them
- `test/CodoMetis.ValueRanges.EFCore.PostgreSQL.InfinityDisabled.IntegrationTests/` — The same live layer for configuration that is per process: its runtimeconfig sets `Npgsql.DisableDateTimeInfinityConversions`, which Npgsql and the plugin each read once, so it cannot be flipped inside the other project's run. Holds the temporal store rule at the extremes with the conversion off. Own container; CI's integration job runs every `test/*IntegrationTests/`
- `test/CodoMetis.ValueRanges.AspNetCore.Tests/` — Host-level behaviour with no ValueRanges registration: configuration binding (`TypeConverter`), MVC and minimal-API binding and JSON bodies via `TestServer`, and the documented OpenAPI schema transformer (`ValueRangesSchemaTransformer.cs`), which `docs/serialization.md` must carry verbatim — edit the test copy, then the doc. `HostCultureProbeTests` binds every discovered type (core and NodaTime) through both hosts under four request cultures; it links `RangeProbes`, `SetProbes`, `WrapperElements` and `Reflect` from the conventions project rather than copying them
- `test/CodoMetis.ValueRanges.Conventions.Tests/` — Repo-level conventions: changelog consistency and form, packaging metadata, release wiring, the SECURITY.md supported-versions table, value set contract compliance, EF mapping parity, the default JSON contract. Everything is discovered (projects by globbing `src/`, types by reflection), so adding a package or a type needs no edit here
Expand Down
10 changes: 10 additions & 0 deletions docs/oracles.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,16 @@ character reaches a `text` element. A row the documents name as a refusal (J06,
CLR type's domain, and an extreme the store spells `±infinity` are counted, not reported, so the
classification is part of what the class asserts and lives in its `DocumentedRefusal`.

The fourth (#136) is the captured collection, the EF Core operand position no other sweep sends.
`CapturedCollectionProbeTests` (integration project) reads every range and value set type from a captured
array, `List`, `HashSet` and `IEnumerable` holding lists chosen to tell a list from the multirange it would
collapse into (empty, overlapping, adjacent, with an empty value, a duplicate, every shape), through
`Contains`, `Any` and `Count`, alone and beside a `Contains` that reads the same collection. The oracle is
the same projection run in memory over the rows as loaded. Its first run registered #76, measured wider (a
range collection no `Contains` reads also fails loudly, as `42809` for `Any(==)` and for `timerange`), and
found #137: `Any` or `Count` with a predicate over an empty collection the plugin sends one parameter per
element throws.

## How to use it

**Run the oracles.** They are ordinary tests; `dotnet test` runs them all. The registered classes are
Expand Down
8 changes: 8 additions & 0 deletions docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,14 @@ three families, none of which a hand-picked sweep had shown: `IsUnboundedStart`/
`(,)` (#109), `RangeSet.Overlaps` on every continuous type (#106), and adjacency at the date extremes
(#110). Its seeds plant a tied-end `Intersect` and a value set `IsSubsetOf` that ignores the tail.

The fuzz sweep binds an operand as a column, a constant or a single parameter, never as a collection.
`CapturedCollectionProbeTests` covers that operand position: every discovered range and value set type,
read from a captured collection through `Contains`, `Any` and `Count`, compared with the same projection in
memory ([oracles.md](oracles.md#axesmd--what-a-consumer-varies)). Its lists are built from the rows as
loaded, so the store's microsecond truncation does not count as a disagreement. It reuses the fuzz sweep's
type discovery (`FuzzTypes`), links `RangeProbes` and `SetProbes` from the conventions project, and runs in
about five seconds.

### The Multirange Oracle

`SmallModelMultirangeOracleTests` covers what the other two do not reach. The single-range oracle
Expand Down
Loading
Loading