Conjecture.EFCore
0.29.0
dotnet add package Conjecture.EFCore --version 0.29.0
NuGet\Install-Package Conjecture.EFCore -Version 0.29.0
<PackageReference Include="Conjecture.EFCore" Version="0.29.0" />
<PackageVersion Include="Conjecture.EFCore" Version="0.29.0" />
<PackageReference Include="Conjecture.EFCore" />
paket add Conjecture.EFCore --version 0.29.0
#r "nuget: Conjecture.EFCore, 0.29.0"
#:package Conjecture.EFCore@0.29.0
#addin nuget:?package=Conjecture.EFCore&version=0.29.0
#tool nuget:?package=Conjecture.EFCore&version=0.29.0
Conjecture.EFCore
Property-based testing for Entity Framework Core, built on Conjecture. Derives entity-graph strategies mechanically from IModel, asserts SaveChanges roundtrip integrity, verifies migration up/down symmetry, and exposes DbInteraction / IDbTarget so EF Core composes with HTTP, gRPC, and messaging under a single InteractionStateMachine<TState>.
Install
dotnet add package Conjecture.Core
dotnet add package Conjecture.EFCore
Usage
using Conjecture.Core;
using Conjecture.EFCore;
using Conjecture.Xunit;
public class OrderTests
{
[Property]
public async Task Order_Roundtrips_Without_Loss()
{
Func<DbContext> factory = () => new MyContext(/* ... */);
Strategy<Order> orders = Strategy.Entity<Order>(factory);
Order order = orders.Sample();
await RoundtripAsserter.AssertRoundtripAsync(factory, order);
}
}
For composed transports, dispatch DbInteraction blocks (Strategy.Db.Add<T>(...), .Update<T>(...), .SaveChanges(...), .Sequence(...)) through an IDbTarget such as InMemoryDbTarget or SqliteDbTarget, then assert with AssertNoOrphansAsync, AssertConcurrencyTokenRespectedAsync, or AssertNoTrackingMatchesTrackedAsync.
Design
See ADR 0065 for the metadata-driven strategy derivation and invariant catalogue.
Links
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Conjecture.Core (>= 0.29.0)
- Conjecture.Interactions.Abstractions (>= 0.29.0)
- Microsoft.EntityFrameworkCore (>= 10.0.7)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.7)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Conjecture.EFCore:
| Package | Downloads |
|---|---|
|
Conjecture.AspNetCore.EFCore
Property-based testing helpers bridging Conjecture.AspNetCore and Conjecture.EFCore via AspNetCoreDbTarget. |
GitHub repositories
This package is not used by any popular GitHub repositories.