Repository navigation
Releases: nullean/entities
Release list
Nullean.Entities 0.2.0
✨ Features
- ConformExhaustive: check an implementation on every transition, down a shortest path by @Mpdreamz in #59
🐛 Bug Fixes
📝 Documentation
- Landing: the film in the hero, muted on a loop, with full screen by @Mpdreamz in #56
- Landing: break each model card, a Built on CsCheck section, and each axis's real failure by @Mpdreamz in #54
- Film: "Model your world. Get the tests for free." by @Mpdreamz in #53
- Landing: "Model your world. Get the tests for free.", with the rich demos on /tour/ by @Mpdreamz in #52
- Theme the docs like the landing page, with its animated header lockup by @Mpdreamz in #50
🧰 Maintenance
⚙️ Automation
Full Changelog: 0.1.1...0.2.0
API Changes: Nullean.Entities.Argh
Scanned: 📑 1 assemblies(s), Suggested change in version: Patch
+ 0 breaking change(s) detected.
🌟 0 new additions, 🔴 0 removals, 🔷 0 modificationsAPI Changes: Nullean.Entities.AspNetCore
Scanned: 📑 1 assemblies(s), Suggested change in version: Patch
+ 0 breaking change(s) detected.
🌟 0 new additions, 🔴 0 removals, 🔷 0 modificationsAPI Changes: Nullean.Entities.CsCheck.AutoBogus
Scanned: 📑 1 assemblies(s), Suggested change in version: Major
+ 0 breaking change(s) detected.
+ 🌟 0 new additions
- 🔴 1 removals
- 🔷 0 modifications📑 Nullean.Entities.CsCheck.AutoBogus.dll
Click here to see the 1 differences
Nullean.Entities.CsCheck.AutoBogus, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b04a6ff7fe029dc7
Nullean.Entities.CsCheck.AutoBogus.dll
- 🔴 CsCheck, Version=4.9.1.0, Culture=neutral, PublicKeyToken=0f2b8f68260a8866 API Changes: Nullean.Entities.CsCheck.FileSystem
Scanned: 📑 1 assemblies(s), Suggested change in version: Major
+ 0 breaking change(s) detected.
+ 🌟 0 new additions
- 🔴 1 removals
- 🔷 0 modifications📑 Nullean.Entities.CsCheck.FileSystem.dll
Click here to see the 1 differences
Nullean.Entities.CsCheck.FileSystem, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b04a6ff7fe029dc7
Nullean.Entities.CsCheck.FileSystem.dll
- 🔴 CsCheck, Version=4.9.1.0, Culture=neutral, PublicKeyToken=0f2b8f68260a8866 API Changes: Nullean.Entities.CsCheck.Reactive
Scanned: 📑 1 assemblies(s), Suggested change in version: Major
+ 0 breaking change(s) detected.
+ 🌟 0 new additions
- 🔴 1 removals
- 🔷 0 modifications📑 Nullean.Entities.CsCheck.Reactive.dll
Click here to see the 1 differences
Nullean.Entities.CsCheck.Reactive, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b04a6ff7fe029dc7
Nullean.Entities.CsCheck.Reactive.dll
- 🔴 CsCheck, Version=4.9.1.0, Culture=neutral, PublicKeyToken=0f2b8f68260a8866 API Changes: Nullean.Entities.CsCheck
Scanned: 📑 1 assemblies(s), Suggested change in version: Major
+ 0 breaking change(s) detected.
+ 🌟 5 new additions
- 🔴 1 removals
- 🔷 14 modifications📑 Nullean.Entities.CsCheck.dll
Click here to see the 20 differences
Nullean.Entities.CsCheck, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b04a6ff7fe029dc7
Nullean.Entities.CsCheck.dll
- 🔴 CsCheck, Version=4.9.1.0, Culture=neutral, PublicKeyToken=0f2b8f68260a8866
+ 🌟 Nullean.Entities.CsCheck.EntitySpecReport Nullean.Entities.CsCheck.EventSourcedSpec<TState, TCommand, TEvent>
+ 🔷 Exhaustive(TemporalRuleSet<TEvent>, Nullable<TimeSpan>, Int32, Int32, Boolean, Action<String>) 💥
+ 🔷 Member type changed from SpecReport to EntitySpecReport. 💥 Nullean.Entities.CsCheck.StateMachineSpecExtensions
+ 🌟 ConformToExhaustive<TState, TTrigger, TEntity>(StateMachine<TState, TTrigger>, TEntity, Func<TEntity, TState>, Action<String>, ValueTuple<TTrigger, Func<TEntity, TEntity>>[])
+ 🌟 ConformToMutableExhaustive<TState, TTrigger, TEntity>(StateMachine<TState, TTrigger>, Func<TEntity>, Func<TEntity, TState>, Action<String>, ValueTuple<TTrigger, Action<TEntity>>[])
+ 🔷 ConformTo<TState, TTrigger, TEntity>(StateMachine<TState, TTrigger>, TEntity, Func<TEntity, TState>, Action<String>, Int64, ValueTuple<TTrigger, Func<TEntity, TEntity>>[]) 💥
+ 🔷 Member type changed from SpecReport to EntitySpecReport. 💥
+ 🔷 ConformToMutable<TState, TTrigger, TEntity>(StateMachine<TState, TTrigger>, Func<TEntity>, Func<TEntity, TState>, Action<String>, Int64, ValueTuple<TTrigger, Action<TEntity>>[]) 💥
+ 🔷 Member type changed from SpecReport to EntitySpecReport. 💥 Nullean.Entities.CsCheck.EntitySpec<T>
+ 🌟 ConformExhaustive<TSut>(Func<TSut>, Action<TSut, EntityStep<T>>, Func<TSut, T, Boolean>, Action<String>, Int32)
+ 🌟 ConformExhaustive<TSut>(Func<TSut>, Func<TSut, EntityStep<T>, String>, Action<String>, Int32, Int32, Func<TSut, TSut>)
+ 🔷 Conform<TSut>(Func<TSut>, Action<TSut, EntityStep<T>>, Func<TSut, T, Boolean>, Action<String>, Int64) 💥
+ 🔷 Member type changed from SpecReport to EntitySpecReport. 💥
+ 🔷 Conform<TSut>(Func<TSut>, Func<TSut, EntityStep<T>, String>, Action<String>, Int32, Int32, String, Int64, Int32, Int32) 💥
+ 🔷 Member type changed from SpecReport to EntitySpecReport. 💥
+ 🔷 Exhaustive(Int32, Int32, Boolean, Boolean, Action<String>) 💥
+ 🔷 Member type changed from SpecReport to EntitySpecReport. 💥
+ 🔷 Sample(Action<String>, Int32, Int32, String, Int64, Int32, Int32) 💥
+ 🔷 Member type changed from SpecReport to EntitySpecReport. 💥 API Changes: Nullean.Entities.Extensions.DependencyInjection
Scanned: 📑 1 assemblies(s), Suggested change in version: Patch
+ 0 breaking change(s) detected.
🌟 0 new additions, 🔴 0 removals, 🔷 0 modificationsAPI Changes: Nullean.Entities.FileSystem
Scanned: 📑 1 assemblies(s), Suggested change in version: Patch
+ 0 breaking change(s) detected.
🌟 0 new additions, 🔴 0 removals, 🔷 0 modificationsAPI Changes: Nullean.Entities.Reactive
Scanned: 📑 1 assemblies(s), Suggested change in version: Patch
+ 0 breaking change(s) detected.
🌟 0 new additions, 🔴 0 removals, 🔷 0 modificationsAPI Changes: Nullean.Entities
Scanned: 📑 1 assemblies(s), Suggested change in version: Patch
+ 0 breaking change(s) detected.
🌟 0 new additions, 🔴 0 removals, 🔷 0 modificationsThe film
"Model your world. Get the tests for free." A five-minute explainer of Nullean.Entities, recorded with reel from reels/.
This release only holds the film for the landing page: the docs workflow copies entities.mp4 into the site. It is not a package release. A new cut replaces the asset (gh release upload film entities.mp4 --clobber) and re-runs the docs workflow.
Nullean.Entities 0.1.1
🐛 Bug Fixes
- Trim a ConformTo failure to the steps the divergence needs by @Mpdreamz in #34
- Name the collection when a relation selector calls a method by @Mpdreamz in #32
📝 Documentation
- Add a validate-on-construction block to the landing rules section by @Mpdreamz in #33
- Use the generic [Constraints] attribute for companion classes by @Mpdreamz in #29
- Drop the "No Rx needed" line from the landing services section by @Mpdreamz in #31
- Explain why Conserves fails an operation that changes the total on purpose by @Mpdreamz in #30
- Say what one AutoTest line runs on the docs home page by @Mpdreamz in #28
- Show rules on the landing as static fields the generator finds by @Mpdreamz in #27
- Document what Violation.Member holds for rules over rows by @Mpdreamz in #26
- Add install commands and NuGet links to the landing page by @Mpdreamz in #20
- Make the landing header scroll away like the other Nullean sites by @Mpdreamz in #19
- Apply the second landing design with verified code samples and a new tagline by @Mpdreamz in #18
Full Changelog: 0.1.0...0.1.1
API Changes: Nullean.Entities.Argh
Scanned: 📑 1 assemblies(s), Suggested change in version: Patch
+ 0 breaking change(s) detected.
🌟 0 new additions, 🔴 0 removals, 🔷 0 modificationsAPI Changes: Nullean.Entities.AspNetCore
Scanned: 📑 1 assemblies(s), Suggested change in version: Patch
+ 0 breaking change(s) detected.
🌟 0 new additions, 🔴 0 removals, 🔷 0 modificationsAPI Changes: Nullean.Entities.CsCheck.AutoBogus
Scanned: 📑 1 assemblies(s), Suggested change in version: Patch
+ 0 breaking change(s) detected.
🌟 0 new additions, 🔴 0 removals, 🔷 0 modificationsAPI Changes: Nullean.Entities.CsCheck.FileSystem
Scanned: 📑 1 assemblies(s), Suggested change in version: Patch
+ 0 breaking change(s) detected.
🌟 0 new additions, 🔴 0 removals, 🔷 0 modificationsAPI Changes: Nullean.Entities.CsCheck.Reactive
Scanned: 📑 1 assemblies(s), Suggested change in version: Patch
+ 0 breaking change(s) detected.
🌟 0 new additions, 🔴 0 removals, 🔷 0 modificationsAPI Changes: Nullean.Entities.CsCheck
Scanned: 📑 1 assemblies(s), Suggested change in version: Patch
+ 0 breaking change(s) detected.
🌟 0 new additions, 🔴 0 removals, 🔷 0 modificationsAPI Changes: Nullean.Entities.Extensions.DependencyInjection
Scanned: 📑 1 assemblies(s), Suggested change in version: Patch
+ 0 breaking change(s) detected.
🌟 0 new additions, 🔴 0 removals, 🔷 0 modificationsAPI Changes: Nullean.Entities.FileSystem
Scanned: 📑 1 assemblies(s), Suggested change in version: Patch
+ 0 breaking change(s) detected.
🌟 0 new additions, 🔴 0 removals, 🔷 0 modificationsAPI Changes: Nullean.Entities.Reactive
Scanned: 📑 1 assemblies(s), Suggested change in version: Patch
+ 0 breaking change(s) detected.
🌟 0 new additions, 🔴 0 removals, 🔷 0 modificationsAPI Changes: Nullean.Entities
Scanned: 📑 1 assemblies(s), Suggested change in version: Patch
+ 0 breaking change(s) detected.
🌟 0 new additions, 🔴 0 removals, 🔷 0 modificationsNullean.Entities 0.1.0
Nullean.Entities 0.1.0
Types say what a thing is. Nothing says what it must do.
Nullean.Entities makes business rules first-class: a rule is a named value, declared once next to the type, and that one declaration validates a value, is tested automatically on generated data, and can watch live events. This is the first release. Docs: https://entities.nullean.net/getting-started/
What you get
- Rules as named values.
Constraint<T>andConstraintSet<T>, withAlways,When/Requires,Transitions,Idempotent,Monotonic,Conserves,OrderIndependent,Unique,Referencesand deadline and liveness rules for event streams.[Constraints]gathers the rules on a type into one generated set, so a rule you add cannot be forgotten. - Tests you do not write.
AutoTest.For(rules, ...)runs one test per axis the rules declare, on nine axes: invariants, idempotency, monotonicity, conservation, absence, deadlines, liveness, order independence, and a check that the tests reached the rules at all (a test that never exercised a rule fails as vacuous). - Records, services and mutable classes. The same
AutoTestruns on immutable records and on services changed in place (Mutate/MutateAsync), awaits async operations, and never blocks on a task. - Failures that read like an incident report. The rule that broke, the operation, the state before and after, the law and what it costs, and a seed that replays the smallest case found.
- Relations declared once.
Relation.ReferenceandRelation.Uniquebuild the rule and tell the data generator which members it relates, so the two cannot drift apart. - Adopt gradually. A rule can start as a warning and become an error on a date you choose.
Packages
| Package | For |
|---|---|
Nullean.Entities |
The rules, Result<T>, state machines and the [Constraints] source generator (bundled). No dependency on a test library or on Rx. |
Nullean.Entities.Reactive |
Temporal and structural rules over IObservable<TEvent> streams |
Nullean.Entities.FileSystem |
File rules over System.IO.Abstractions |
Nullean.Entities.Extensions.DependencyInjection |
Constraint sets in Microsoft.Extensions.DependencyInjection |
Nullean.Entities.AspNetCore |
A 400 ValidationProblem keyed by member, from violations |
Nullean.Entities.Argh |
Validate the options a Nullean.Argh command receives |
Nullean.Entities.CsCheck |
The generated tests, on CsCheck. Tests only. |
Nullean.Entities.CsCheck.Reactive |
Rx scheduler terminals for the CsCheck package (opt-in) |
Nullean.Entities.CsCheck.FileSystem |
A mock file system in generated data |
Nullean.Entities.CsCheck.AutoBogus |
Bogus and AutoBogus generators that route their draws through CsCheck so seeds replay |
All target net10.0 and net11.0. The core, Reactive, FileSystem, DependencyInjection, AspNetCore and Argh packages are trim and native-AOT clean (CI publishes a native AOT smoke app on Linux, macOS and Windows); the CsCheck packages rely on reflection and are for tests only.
Start here
[Constraints]
public static partial class OrderConstraints
{
public static readonly Constraint<Order> TotalNeverNegative = Constraints<Order>.Always(o => o.Total >= 0, "An order total is never negative.");
public static readonly Constraint<Order> CancelIsRepeatable = Constraints<Order>.Idempotent(o => o.Cancel());
public static readonly Constraint<Order> VersionNeverGoesBack = Constraints<Order>.Monotonic(o => o.Version, MonotonicDirection.NonDecreasing);
}
await AutoTest.For(OrderConstraints.Instance, orders).RunAsync();Getting started · The nine axes · Services and mutable classes · Rolling out a rule
Good to know
- Versions are
0.x: the API can still change between minor versions. 0.1.0-preview.1was published without the source generator, so[Constraints]did nothing; use0.1.0-preview.2or later.- MIT licensed.
Nullean.Entities 0.1.0-preview.2
📝 Documentation
- Rewrite the package READMEs for onboarding and use the new icon by @Mpdreamz in #16
- Publish the docs to entities.nullean.net with a branded landing page by @Mpdreamz in #15
Full Changelog: 0.1.0-preview.1...0.1.0-preview.2
Nullean.Entities 0.1.0-preview.1
- No changes
Full Changelog: ...0.1.0-preview.1
Warning
Release Drafter could not find a previous published release for nullean/entities. This draft was created without a comparison baseline.
Important
Treat this draft as a manual starting point.
Review the proposed version, tag, and notes before publishing.
If you did not expect this to happen, open an issue.