Skip to main content

Extension packages

Expectations for types outside the base class library are provided by separate packages. Each package adds extension methods on IThat<T> for its types, so once it is referenced, its expectations appear on That(…) next to the built-in ones.

Core extensions​

These packages live in the aweXpect repository and are released together with aweXpect, always with the same version.

PackageChecks
aweXpect.JsonJSON strings, JsonElement, JsonNode and the serialization of objects
aweXpect.Reflectionassemblies, types and members, for architecture and convention tests
aweXpect.Snapshotsstrings, objects and public APIs against a reviewed snapshot
aweXpect.WebHttpRequestMessage, HttpResponseMessage, Uri and IPAddress
aweXpect.XmlXML strings, XElement and XDocument

Separate extensions​

These packages have their own repository and release cycle.

PackageVersionChecks
aweXpect.Logging0.3.0the records of a FakeLogger or FakeLogCollector
aweXpect.Mockolate4.0.0interactions with Mockolate mocks
aweXpect.Testably3.0.0the file and time systems of Testably.Abstractions
aweXpect.Chronology

aweXpect.Chronology adds readable TimeSpan and DateTime values like 5.Seconds() or 24.December(2024). It adds no expectations and does not depend on aweXpect; many samples in this documentation use it.

Write your own​

If no package covers your types, you can add expectations yourself with the same API these packages use. Extending aweXpect walks you through your first expectation and the conventions for its failure messages.