EasyAssertions 0.7.0
See the version list below for details.
dotnet add package EasyAssertions --version 0.7.0
NuGet\Install-Package EasyAssertions -Version 0.7.0
<PackageReference Include="EasyAssertions" Version="0.7.0" />
paket add EasyAssertions --version 0.7.0
#r "nuget: EasyAssertions, 0.7.0"
// Install EasyAssertions as a Cake Addin #addin nuget:?package=EasyAssertions&version=0.7.0 // Install EasyAssertions as a Cake Tool #tool nuget:?package=EasyAssertions&version=0.7.0
Easy-to-use fluent assertions with actually useful failure messages.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net35 is compatible. net40 was computed. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
This package has no dependencies.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on EasyAssertions:
Repository | Stars |
---|---|
soxtoby/SlackNet
A comprehensive Slack API client for .NET
|
New Assertions:
- ShouldBeSingular & ShouldBeLength, for asserting on IEnumerable length.
- ShouldNotContain, for asserting that a collection does not contain a specific item.
- ShouldContainKey & ShouldNotContainKey, for asserting whether or not a KeyedCollection contains an item for the specified key.
- ShouldBeNaN & ShouldNotBeNaN for floats & doubles.
- ShouldMatchReferences that takes a param array of expected instances.
Breaking Changes:
- ShouldBeThis renamed to ShouldReferTo.
- ShouldNotBeThis renamed to ShouldNotReferTo.
- ShouldBeThese renamed to ShouldMatchReferences.
- Calling ShouldBe with two float or double values to test equality has been marked as obsolete and will no longer compile.
- EasyAssertionConstructor is now marked as internal. Use EasyAssertion.Failure() instead.
Other Changes/Fixes:
- Number, bool, char & null literals will no longer appear twice in exception messages.
- Null values appear in exception messages as <null> instead of <>.
- Fixed IndexOutOfRangeException when actual string is shorter than expected string.
- Failing Func expressions returning value types are no longer wrapped in "Convert()" (may still appear inside expression).
- FailureMessage expressions & outputs are escaped for SmartFormat, so it doesn't try to evaluate bits that look like placeholders (e.g new { someVar }).
- ShouldBe assertions for floats & double now accept any object for the actual value type. Assertion will fail if object is not of the correct type.