Skip to content

Tests and CI

What the test suite covers and what CI runs. Running the tests: Build and test the library.

Test suite coverage

The test suite covers, among others:

Area What's tested Coverage
DecimalAmount arithmetic All operators (+, -, *, /), checked overflow, CompareTo, Equals, GetHashCode, ToString round-trip, cross-precision comparisons Unit (100+ cases)
Variant Every one of the 18 kinds and none: its getter, the InvalidCastException of every other getter, the type, the printed form; the union switch over every kind; implicit conversions; array conversions; matching a primitive without allocating (VariantTest) Unit
VariantListRepresentation Selectors over every array kind and dictionaries, refused selections, paths, the leaves of a nested variant and the round trip back (VariantListRepresentationTest) Unit
Registry (EAV) GetValue and GetObservable over value and observable providers: a value found, none, a fallback provider (RegistryTest) Unit

DecimalAmount arithmetic uses checked semantics throughout — overflow throws OverflowException, never silently wraps.

CI

  • Build + test on push to master (and PRs): runs the full test suite.
  • Docs lint on workflow_dispatch: validates that all public types have XML doc comments.
  • Docs deploy on push to master (if docs/** changed): builds MkDocs, deploys to lib.docs.virtufin.com.