The test strategy has two layers: hand-written regression tests and generated spec-alignment tests.
tests/DevOp.Toon.TestsPrimary hand-written coverage. The ManualTests folder is where targeted regression tests live.
Useful files:
ToonEncoderTests.csToonDecoderTests.csToonServiceTests.csHybridObjectArrayTests.csCompactHybridRegressionTests.csIgnoreNullOrEmptyTests.csExcludeEmptyArraysTests.csJsonComplexRoundTripTests.csToonAsyncTests.cstests/DevOp.Toon.SpecGeneratorGenerates checked-in tests from the TOON spec repository.
Important files:
Program.csSpecGenerator.csFixtureWriter.csSpecSerializer.csdotnet test
dotnet test --collect:"XPlat Code Coverage"
dotnet test --filter "FullyQualifiedName~ToonDecoder"
The repo provides specgen.sh, which:
tests/DevOp.Toon.Tests/GeneratedTestsCurrent script target:
v3.0.0Use spec generation when:
DefaultOptionsCollection disables parallelization for tests that mutate static defaults. If you touch:
ToonEncoder.DefaultOptionsToonDecoder.DefaultOptionsmake sure tests remain isolated and do not leak global state between runs.