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 @@ -20,7 +20,7 @@ Behaving like the real system is a must. The other goals are strong defaults and
- **Mirror the real API per target framework, and nothing more.** `IFileSystem`, `ITimeSystem` and `IRandomSystem` follow the shape of `System.IO`, `DateTime`/timers/`TimeProvider` and `Random`/`Guid` for each target framework. `Testably.Abstractions.Parity.Tests` fails when a member is missing; intentional gaps are excluded in `TestHelpers/Parity.cs` or a `Net*ParityTests` class. Keep the rest of the public API minimal: anything not meant for users is `internal`.
- **The mock must behave like the real file system** on Windows, Linux and macOS, and on .NET Framework where it differs. Use the mock's own context instead of the host: branch on the mock's `Execute` (`IsWindows`, `IsLinux`, `IsMac`, `IsNetFramework`), which honours `SimulationMode`, resolve paths with `Execute.Path`, and create exceptions in `ExceptionFactory`. Check behaviour against the real file system, not against assumptions.
- **Core and main packages are versioned separately.** Core = `Testably.Abstractions`, `Testably.Abstractions.Interface`, `Testably.Abstractions.FileSystem.Interface`, released from `core/v*` tags. Main = `Testably.Abstractions.Testing`, `.Compression`, `.AccessControl`, `.MemoryMappedFiles`, released from `v*` tags. Main projects consume `Testably.Abstractions.Interface` as a NuGet package (version range in `Directory.Packages.props`), so an interface change is invisible to them until a Core release is published and the range is bumped. For such a change set `BuildScope` in `Pipeline/Build.cs` to `CoreOnly`, release Core, bump the range, then reset it (`MainOnly` covers the reverse case).
- **Public API is reviewed.** Every public change shows up in the `*.awexpect-snapshot.txt` files under `Tests/Api/`; update them deliberately and keep them in the same PR. New public members need XML docs (`GenerateDocumentationFile` is on and warnings are errors).
- **Public API is reviewed.** Every public change shows up in the `*.awexpect-snapshot.cs` files under `Tests/Api/`; update them deliberately and keep them in the same PR. New public members need XML docs (`GenerateDocumentationFile` is on and warnings are errors).
- `netstandard2.0` sources have no polyfill package: hand-written polyfills live in `Source/Testably.Abstractions.Testing/Polyfills/`, and records, `init` and `Index`/`Range` (`^1`, `..`) only compile behind a `FEATURE_*` or `NET*` guard there. Test projects use the `Polyfill` package and may use them on `net48`.

## Validation
Expand Down
8 changes: 4 additions & 4 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@
<ItemGroup>
<PackageVersion Include="System.Memory" Version="4.6.3" />
<PackageVersion Include="System.Net.Http" Version="4.3.4"/>
<PackageVersion Include="aweXpect" Version="4.0.0-pre.3"/>
<PackageVersion Include="aweXpect" Version="4.0.0"/>
<PackageVersion Include="aweXpect.Snapshots.PublicApi" Version="4.0.0"/>
<PackageVersion Include="aweXpect.Chronology" Version="1.1.0"/>
<PackageVersion Include="aweXpect.Testably" Version="3.0.0-pre.3"/>
<PackageVersion Include="aweXpect.Mockolate" Version="4.0.0-pre.3"/>
<PackageVersion Include="aweXpect.Testably" Version="3.0.0-pre.4"/>
<PackageVersion Include="aweXpect.Mockolate" Version="4.0.0-pre.4"/>
<PackageVersion Include="Mockolate" Version="3.6.0"/>
<PackageVersion Include="TUnit.Engine" Version="1.80.0"/>
<PackageVersion Include="Polyfill" Version="11.4.5"/>
<PackageVersion Include="aweXpect.Snapshots.PublicApi" Version="4.0.0-beta.0.pre.3"/>
<PackageVersion Include="AutoFixture" Version="4.18.1" />
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Docs/agents/project-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ Key design points:
| `Tests/Testably.Abstractions.Tests` | Folders mirror the interfaces: `FileSystem/<Type>/`, `TimeSystem/`, `RandomSystem/`; `TestHelpers/` holds project-specific helpers |
| `Tests/Testably.Abstractions.Testing.Tests` | Tests of the mock-only API, mirroring `Source/Testably.Abstractions.Testing` |
| `Tests/Testably.Abstractions.Parity.Tests` | `ParityTests`, one `Net*ParityTests` subclass per framework, shared exclusions in `TestHelpers/Parity.cs` |
| `Tests/Api/*` | API snapshot tests with one `ApiApprovalTests.<Assembly>.<framework>.awexpect-snapshot.txt` per assembly and framework |
| `Tests/Api/*` | API snapshot tests with one `ApiApprovalTests/<Assembly>/<framework>.awexpect-snapshot.cs` per assembly and framework |

The test helpers reference the released `Testably.Abstractions` package and the `Testably.Abstractions.Testing` project.
2 changes: 1 addition & 1 deletion Docs/agents/workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ dotnet test --project Tests/Testably.Abstractions.Testing.Tests -f net10.0 --no-

## Public API snapshots

The API tests load the compiled assemblies from `Source/<Assembly>/bin/<Configuration>/<framework>/` for every framework listed in `Source/Directory.Build.props` and compare them with the aweXpect snapshots `Tests/Api/<Project>/ApiApprovalTests.<Assembly>.<framework>.awexpect-snapshot.txt` (the dots in the file name are URL-encoded). Build the solution first; otherwise frameworks that the test project does not reference fail with `FileNotFoundException`.
The API tests load the compiled assemblies from `Source/<Assembly>/bin/<Configuration>/<framework>/` for every framework listed in `Source/Directory.Build.props` and compare them with the aweXpect snapshots `Tests/Api/<Project>/ApiApprovalTests/<Assembly>/<framework>.awexpect-snapshot.cs`. Build the solution first; otherwise frameworks that the test project does not reference fail with `FileNotFoundException`.

```ps
dotnet build Testably.Abstractions.slnx
Expand Down
Loading