Skip to content

AtyaLibraries/Testing

Repository files navigation

Atya.Governance.Testing

Small test-only helpers for Atya packages and applications.

This package is intended for test projects only. Production projects should not reference it.

Helpers

  • FakeClock exposes controllable UtcNow, Now, and Today values.
  • JsonAssert compares JSON structurally, ignoring formatting and property order.
  • FakeCorrelationIdAccessor provides a mutable correlation id for diagnostics tests.
  • FakeCurrentUser provides a mutable authenticated or anonymous current user.
  • ResultAssertions checks common result-like shapes without referencing a specific result package.
  • ValidationFailureBuilder creates framework-neutral validation failure data.

Development

Restore, build, and test from the repository root:

dotnet restore .\Testing.sln
dotnet build .\Testing.sln --configuration Release --no-restore -m:1
dotnet test .\Testing.sln --configuration Release --no-build -m:1

Pack the library:

dotnet pack .\src\Testing\Testing.csproj --configuration Release --output .\artifacts\packages

Publishing

Packages are published to nuget.org automatically when changes are merged into master.

Configure a GitHub Actions repository secret named NUGET_API_KEY with a nuget.org API key that has permission to push Atya.Governance.Testing.

NuGet package versions are immutable. Update the package <Version> in src/Testing/Testing.csproj before merging a release change, otherwise nuget.org will reject the already-published version.

For local package-feed publishing, see LOCAL_NUGET.md.

About

Atya.Governance.Testing is a lightweight .NET 10 test-helper library for deterministic, readable unit tests with fake clocks, current users, correlation IDs, JSON assertions, result assertions, and validation failure builders.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors